Hi,
I want to store the results of running ls in a directory on a remote host using ftp.
For example,
#!/usr/bin/ksh
ftp -n hostx <<EOF
user username password
ls /tmp/RandomFiles.*
#I need to put the results of that ls command into some file, so I can get the last file in that list
The ultimate goal is to get the LAST RandomFiles file. Since I can't just tail -1 in ftp, I'm trying to store the results of ls in a file and then get the last entry from that file, then finally ftp that exact entry from the host again.