View Single Post

   
  #2 (permalink)  
Old 01-05-2008, 06:29 AM
Laurenz Albe
 
Posts: n/a
Default Re: Script that checks for existence of file on remote server.

vegas_girlie <minnie_valerie@hotmail.com> wrote:
> I would like to know if there is a way in shell scripting to check the
> existence of a file after FTP? Basically if the file does not exist in
> a certain directory, the shell script should fail.


if [ ! -f somefile ]; then
exit 1
fi

to check for the existence of a certain file.

Yours,
Laurenz Albe
Reply With Quote