Hi All,
This is a snippet of my script:
###
ftp -in $SERVER_IP <<-EOF >> $FTP_LOG
user $LOGIN $PASS
cd $DIR_LOC
dir *.* ${FDIRLIST}
! . ${PARSE_SCR} ${FDIRLIST} ${FLIST}
mget $(< $FLIST)
EOF
###
Description:
In one FTP session I get a long listing of the remote
directory and create a file locally with those contents.
Now, I pass this file name to another local script to parse the contents to get the files which are created today at the remote server.
It seems to be not possible for me to read this $FDIRLIST file in the same FTP session and parse it locally.
What is the work-around?
Alternatively,
how could I know "today's" files on the remote server in an
FTP session so that I can mget those particular files?
The files on the remote server don't have date-time stamp in their names.
Do I HAVE to use two FTP session in this case?
Both server are Sun Sol. 5.8
Thanks,
bharix
This is a snippet of my script:
###
ftp -in $SERVER_IP <<-EOF >> $FTP_LOG
user $LOGIN $PASS
cd $DIR_LOC
dir *.* ${FDIRLIST}
! . ${PARSE_SCR} ${FDIRLIST} ${FLIST}
mget $(< $FLIST)
EOF
###
Description:
In one FTP session I get a long listing of the remote
directory and create a file locally with those contents.
Now, I pass this file name to another local script to parse the contents to get the files which are created today at the remote server.
It seems to be not possible for me to read this $FDIRLIST file in the same FTP session and parse it locally.
What is the work-around?
Alternatively,
how could I know "today's" files on the remote server in an
FTP session so that I can mget those particular files?
The files on the remote server don't have date-time stamp in their names.
Do I HAVE to use two FTP session in this case?
Both server are Sun Sol. 5.8
Thanks,
bharix