Oh, thanks a lot for your recommendation, but it was only an example, for knowing whether is a newer file I will us the newer command.
newer file-name
Get the file only if the modification time of the remote file is
more recent that the file on the current system. If the file
does not exist on the current system, the remote file is
considered newer. Otherwise, this command is identical to get.
But what I only need is put the name of the file in a variable and then get variable the program will be something like that:
# !/usr/bin/ksh
# set variables
export ND_ADDRESS=13x.14x.3x.xx
export ND_BASE_DIR=~/prxxx
export RICH_BASE_DIR=~/pruexxx
export ND_USER=jbxxxx
export ND_PASSWORD=gxxxx
ftp -nvi $ND_ADDRESS << quit
user $ND_USER $ND_PASSWORD
cd $RICH_BASE_DIR
lcd $ND_BASE_DIR
for i in 'ls'
do
{
newer $i
}
done
bye
The error message is: We only support non-print format, sorry.
?Invalid command
(remote-file) (local-file) usage: newer remote-file [ local-file ]
The same with get command. Thanks. Jose.