The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 06-21-2005
Just Ice's Avatar
Just Ice Just Ice is offline Forum Advisor  
Lights on, brain off.
  
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 637
you could also make the ftp section into each own function and call that function when required ...


Code:
hostname=box
user=user1
pass=passWd1

ftp_files(){
ftp -inv $hostname << !
user $user $pass
<commands..>
quit
!
}

if [ cond ]
then
    ftp_files
else
    <commands...>
fi