Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Ftp thru shell script
Name: siddhartha Date: July 10, 2001 at 12:30:09 Pacific
Comment:
could u pls send me the code on how to ftp thru shell script????
Name: stefan caunter Date: July 17, 2001 at 19:47:47 Pacific
Reply:
what you need to do is test for the exit status of the ftp command in a subshell first set a variable to be the exit status of ftp -n -i; if it is 0 everything is ok, if it is greater than 0, problem. soooo.... $var=`(ftp -n -i $REMOTE_HOST; echo $?)` if [$var -eq 0] ; then user xxxxx pass xxxxx elif [$var -gt 0] ; then echo "Could not connect to $REMOTE_HOST"
0
Response Number 2
Name: meehong Date: July 24, 2001 at 02:27:16 Pacific
Summary: How do I get FTP prompt by calling a shell script. I just want to be able to execute a shell script that connect to the ftp server and just return the FTP prompt. so I dont have to type user/pasword ...
Summary: hello, I am having trouble creating a batch script to FTP a file from UNIX to NT. It seems that when I invoke the script, the ftp command invokes the interactive ftp interpreter and does not return c...