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
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