Hi,
I'm trying to do an FTP script that will read from a list of files and send only the files in that list.
Would this work? Does anyone have anything simpler.
ftp -nv <<EOF
open server
user username password
get $(nawk -F_ -f bbb.awk Filelisting.txt)
EOF
no that won't work..
read man page of ftp command and understand the limitation of that command...
I know you can do it though.
ftp -nv <<EOF
open server
user username password
$(nawk -F_ -f bbb.awk Filelisting.txt | sed 's#^#get #')
EOF
or change your bbb.awk accordingly - you get the idea
Thanks.
Here's the contents to my bbb.awk file:
{
d=substr($NF, 1, index($NF, ".")-1)
split(d, dA, "-")
print dA[3] dA[1] dA[2] "\t" $0
}
{
d=substr($NF, 1, index($NF, ".")-1)
split(d, dA, "-")
print "get " dA[3] dA[1] dA[2] "\t" $0
}