Prev: moving files from current location to ftp
Next: Examine standard output and exit immediately if the exit code is non-zero?
From: laxman on 26 Jul 2010 08:49 Hi all, please find the below script. Using the below script i am able to put the files from one location to other location but i want to know the files moving status through logs how i can i generate logs. Please help me. #!/binbash HOST='4sftp.four-soft.com' USER='lakshmanrao' PASSWD='xxxxxxxx' ftp -i -n $HOST <<EOF user ${USER} ${PASSWD} binary cd /test mput * quit EOF
From: Ben Bacarisse on 26 Jul 2010 10:40
laxman <alakshmanrao(a)gmail.com> writes: > please find the below script. Using the below script i am able to put > the files from one location to other location but i want to know the > files moving status through logs how i can i generate logs. Please > help me. > > #!/binbash /bin/bash > > HOST='4sftp.four-soft.com' > USER='lakshmanrao' > PASSWD='xxxxxxxx' > > ftp -i -n $HOST <<EOF My ftp produces failure messages on the standard output (I don't know if this is universal) so you can collect them like this: ftp -i -n $HOST >/tmp/ftp-log <<EOF -- Ben. |