Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check the value of a argument

Status
Not open for further replies.

guzler

Technical User
May 28, 2003
10
US
Hello,

How do I check the value of argument? If it is not null only then I need to pass this into my script ..

In a ftp script I have to put the datafile into a specific directory. If the directory is not given then it should put it in the common directory .. how do I this ..

{
id=$5
un=$6
pw=$7
ldir=$8
rdir=$9
action=$10
file=$11
#
# change to outgoing directory to get the datafile
cd $dir
#
# If the value for rdir is not null then I need to
# get the value and pass it in ftp script
#
if ["$rdir"!= ""]
then
dir=$rdir
fi
#
ftp -n -v $id << EOF
user $un $pw
prompt
ascii
cd $rdir
$action $file
bye
EOF
}

Thanks in Advance

guzler

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top