I am trying to pass arguments to the script i am wrinting.
When no argument is passed or wrong argument is passed, the script needs to output the way it needs to be called and exit.
Currently, when no arguments is passed, it is not getting exited but goes on assuming those variables to be blank.
The below is my code.
Can somebody point out what i am doing wrong..
Cheers!!!!
Last edited by mac4rfree; 05-02-2011 at 07:56 AM..
hi
i have a function
abc()
{
//from this function i am passing some args to another function def()
}
def()
{
//Now i need to calculate the no of input args and iterate through them
}
please help (4 Replies)
hi
i have a function
abc
{
//from this function i am passing args to antoher function like
def a b c j k l
}
now i want to count the no of args coming to def() function and iterate over those values
is there any way to do this one
please help (2 Replies)
Hi ,
I have three funcions f1, f2 and f3 .
f1 calls f2 and f2 calls f3 .
I have a global variable "period" which i want to pass to f3 .
Can i pass the variable directly in the definition of f3 ?
Pls help .
sars (4 Replies)
Hi,
I am using SYBASE database. in my script i am connecting to DB via using isql.
isql -U${S_USER} -S${S_SERV} -D${S_DB} -P${S_PWD} -b0 -w3000 -h0 -s"|" -i${MYDIR}/ABC.sql -oXYZ.txt << FINSQL
i am taking a ABC.sql file to use the queries written in it and storing the output in... (3 Replies)
hi,
i have an rpm, and i am looking at the presinstall script. i can see it takes in an argument, but what i do not know is how this argument is passed to the script? is there something that calls the preinstall script? i thought the preinstall script was the first thing executed.
thanks (2 Replies)
Hi all,
I am trying to delete columns in a file using a script. The columns that need to be deleted are passed as arguments to the script.
The script should look like this
> delete_columns.sh <file_name.txt> <column_numbers_to_be_deleted>
The contents of the file_name.txt will be like ... (5 Replies)
My requirement is that I want to pass similar argument to a shell script and process it in the script. Something like below:
myScript.sh -c COMPONENT1 -c COMPONENT2 -a APPNote: -c option can be specified multiple times and -a is optional parameter
I know this can be achieved using... (2 Replies)
Discussion started by: rajdeep_paul
2 Replies
LEARN ABOUT CENTOS
avahi-autoipd.action
avahi-autoipd.action(8) System Manager's Manual avahi-autoipd.action(8)NAME
avahi-autoipd.action - avahi-autoipd action script
SYNOPSIS
/home/lennart/tmp/avahi/etc/avahi/avahi-autoipd.action
DESCRIPTION
avahi-autoipd.action is the action script that is called whenever an IP address has been acquired by avahi-autoipd or when it detected an
IP address conflict. The script should add or remove the specified address from the specified network interface.
PARAMETERS
argv[1] An event string: one of BIND, CONFLICT, UNBIND or STOP. If BIND is passed an IP address has been successfully acquired and the
script shall add it to the network interface. If CONFLICT is passed avahi-autopid detected a IP address on the local network, the action
script should remove the configured IP address. If UNBIND is passed the IP address should be removed from the interface, too, because a
routable address has been configured to the interface by some other program. If STOP is passed the avahi-autoipd is being shutdown and the
action script should remove the IP address. In short: on BIND the address should be added to the interface, on CONFLICT, UNBIND or STOP it
should be removed.
argv[2] The network interface name.
argv[3] An IP address from the IPv4LL range.
AUTHORS
The Avahi Developers <avahi (at) lists (dot) freedesktop (dot) org>; Avahi is available from http://avahi.org/
SEE ALSO avahi-autoipd(8), dhclient-script(8), ip(8), ifconfig(8)COMMENTS
This man page was written using xml2man(1) by Oliver Kurth.
Manuals User avahi-autoipd.action(8)