Hi
I was able to pass parameters to a shell script from the command line but now, I am trying to make the shell script to get those parameters/values from a file.
Please give me ideas how to do this or if you have an example or website that shows how to do this.
I tried searches but it... (2 Replies)
Can anyone help me how to write a shell script which accepts input parameter. My requirement is as follows:
I need to run a shell script with a input parameter, and inside the script i will create a file with this input parameter name.
Please help me out to create such a shell script.
... (1 Reply)
Hi All
I have a shell script which calls all the Teradata Utiltyes . There is a sudden change in the requirment .
What i'm asked to do is
pass on the DATE to the shell script which should take the date automatically and run the utilityes.
i.e. the date should not be passed on... (5 Replies)
Hi,
I am new to unix and using linux 7.2. I would like to create a script that would make it easyer for me to run my java programms. At the moment I have to type java myJavaprogram
I am trying to write a script that will allow me to type something like this "myscript myJavaprogram" or maybe... (4 Replies)
I would like to run a compress script on files in certain directories.
My compress_script.sh is just basically
compress file*
In order for me to use this I have to copy it into each directory and run it.
How can I state the directory on the command line with the compress script so it... (2 Replies)
How can i chnage the parameter value in shell script.
file name is icare_mmi_cls.com, inside that the parameter name is 10.100.1.2" replace the address to bep-sftp.cce.com.
can you please provide me with examples.
Thanks
Double post - check your PMs and follow the rules, thanks. (0 Replies)
How can i chnage the parameter value in shell script.
file name is icare_mmi_cls.com, iside that the parameter name is 10.100.1.2" replace the address to bep-sftp.cce.com.
can you please provide me with examples.
Thanks. (3 Replies)
Hi
I have two shell script, the second script takes as a parameter the output variable of the first script, please how to retrieve the variable from the first script to pass as a parameter to the second script?
Script1.sh
i=0
i=$(($i + 1))
Script2.sh
echo $1
Thank you (0 Replies)
Discussion started by: chercheur111
0 Replies
9. Post Here to Contact Site Administrators and Moderators
Variable I have in my shell script
diff=$1$2.diff
id=$2
new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk -F'~' ''$2 == "$id"' {print $0}' > $new
I could see value of $id is not passing to the awk... (0 Replies)
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff |... (1 Reply)
Discussion started by: Sarita Behera
1 Replies
LEARN ABOUT DEBIAN
asp
ASP(1) User Manual ASP(1)NAME
asp - find an host IP address by its name
SYNOPSIS
asp [-uv] [-f | [-d dir] [-e ext]] [-a addresses] [-r repetitions] [-s send_delay] [-w wait_time] [-p port] hostname
asp -V
DESCRIPTION
Asp finds the IP address of an Internet connected host. In order to find it, the peer hostname (not the FQDN), and the range of its possi-
ble IP addresses need to be specified. Those IP addresses could be simple IP addresses as 127.0.0.1 or "metaip" addresses as 127.0.0.1-20
or 127.0.0.*: the former is a simple way to avoid to type a lot of consecutive addresses, the latter is short for 127.0.0.1-254.
In order to simplify the management of the associations between hostnames and addresses, asp searches in a specified directory a text file
containing the possible IP addresses of the looked for host. The name of the text file has to be formed by the hostname followed by an
optional extension of your choice.
For example to find the author's dynamic IP address, obviously if I am on line, you can provide my metaip address on standard input with
the command:
echo "195.31.186.1-62
194.166.58.2-18" | asp -f atomic
or you can put my metaip address in a file called atomic in your ~/.asp directory, like this:
echo "195.31.186.1-62
194.166.58.2-18" > ~/.asp/atomic
and then you can simply do:
asp atomic
OPTIONS -u Update the file /etc/hosts with the IP address of hostname or delete the possible old entry if the address is not found. Obviously
the file have to by writable by the user.
-v Include more verbiage to make output readable by humans. Default consists only of dotted quad IP address, which is intended for
output substitution in scripts.
-f Force the reading of addresses from standard input instead that from the hostname's file.
-d dir
Set the directory containing the addresses file referred by hostname to dir. Default is ~/.asp.
-e ext
Set addresses files extension to ext. Default is no extension.
-a addresses
Set the number of queries to send before make a pause of send_delay seconds. Default is 12 queries.
-r repetitions
Set the number of times to try the same address. Default is 3 times.
-s send_delay
Delay the sending of the next group of addresses send_delay seconds. Default is 2 seconds.
-w wait_time
Wait the peer reply for wait_time seconds. Default is 5 seconds.
-p port
Specify an alternative port number. For default the port number is obtained searching the asp entry in /etc/services.
-V Show version information.
ENVIRONMENT
ASPCMD This variable could be used to store your preferred settings. An option set in this environment variable could be overridden or tog-
gled from command line.
BUGS
UDP is an unreliable protocol, therefore there is a chance you will not find the host even if it is on line. Anyway, if you are sure that
the peer is on line and asp aware, you could adjust the various parameters until you get a reply. At last you will find the correct set-
tings for your particular needs. This until the RDM communication style will be implemented under Linux.
Obviously the hostname has to be unique among the possible IP addresses: asp will hook to the first correct reply.
AUTHOR
Stenio Brunetta <stenio@brunettaeperin.it>
Comments and suggestions are welcome.
ACKNOWLEDGMENTS
Steven N. Hirsch <shirsch@ibm.net> for v1.3 bug fix and for the verbose option.
Colin Phipps <cphipps@doomworld.com> for the tmpnam security issue.
SEE ALSO aspd(8).
Linux February 1997 ASP(1)