The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sftp status check fisa HP-UX 4 02-27-2008 07:18 PM
Script to check status of a PID zeekblack Shell Programming and Scripting 14 10-03-2006 04:09 PM
check the status and send an email with status isingh786 Shell Programming and Scripting 3 12-29-2005 07:22 PM
Ftp Status Check acheepi Shell Programming and Scripting 4 09-08-2005 04:23 PM
Status check of Automated FTP anijog Shell Programming and Scripting 5 03-04-2004 02:30 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-03-2007
april april is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 10
Check FTP Status

To all,
I need to run a ftp command in one of my scripts and I need to evaluate what happens after it's done. The problem is the script would not capture the ftp responses. If I type the same thing on the command
line, I get all kinds of responses. I would like to capture the same responses in my script.

Any suggestions?

------------------------------------------------------------------
Here is what it looks like in my script:

ftp -n -i 123.123.123.123 <<EOF >test
ascii
close
quit
EOF

Result: test is empty.

------------------------------------------------------------------
I tried this:

echo open 123.123.123.123 >>rin
echo ascii >>rin
echo close >>rin
echo quit >>rin

ftp -n -i <rin >test

Result: test is empty.

------------------------------------------------------------------
I typed the ftp command on the command line:

ftp -n -i 123.123.123.123
Connected to 123.123.123.123.
220-NETIFTP1 IBM FTP CS V1R7 at 123.123.123.123, 18:08:57 on 2007-08-03.
220 Connection will close if idle for more than 5 minutes.
ftp> open
Already connected to 123.123.123.123, use close first.
ftp> ascii
c200 Representation type is Ascii NonPrint
ftp> close
221 Quit command received. Goodbye.
ftp> quit
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:15 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0