• No replies
6902 Posts

Pinned topic ftp script which read from a file and ftp content from a directory

‏2013-01-09T06:55:44Z |
hi ,

am new to AIX, I need a help.

Actually, i got a machine which generate lots of log. I have to manually ftp the log files on my computer (backup) and rm the file to liberate space on my server.
am able to list all file for more than 10 days in a text file by using the command:

find /usr/script_test -type f -mtime +10>/usr/ftprm.txt

I want my script to read the text file, and ftp the contents to another machine and then rm the files which have been ftp.
find the script am working on: anyone can help me out whats going wrong on that:
Text_File=$( awk '{print $1}' ftprm.txt)

ftp -i -n << EOF
user loguser XXXXX
mput $Text_File