LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ftp -n pipe for error (https://www.linuxquestions.org/questions/linux-newbie-8/ftp-n-pipe-for-error-476618/)

camilian 08-23-2006 11:21 AM

ftp -n pipe for error
 
I have the following korn shell program for SLES 9
ftp -n server.ppd.com <<EOF
user $1 $2

cd /fs/m/project/fis/
mget *
prompt

EOF

This is working. how do I collect an error?
If I have an error after cd /fs/m/project/fis/
because the path does not exist. Then how can I check.
I see that get the following code


550 /fs/m/project/fis/ : A file or directory in the path name does not exist.

The program continues and does not stop and I can't stop after the error.

camilian 08-23-2006 12:35 PM

fix the probelm
 
I fixed the problem by
./file >/tmp/log

log has the error iformation


All times are GMT -5. The time now is 11:43 AM.