The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to make a line BLINKING in output and also how to increase font size in output mail2sant Shell Programming and Scripting 3 04-14-2008 08:30 AM
top output new2ss UNIX for Advanced & Expert Users 4 03-11-2008 04:58 AM
awk output useless79 Shell Programming and Scripting 3 09-03-2007 11:21 AM
ls -al output is -rw------T Hayez UNIX for Dummies Questions & Answers 2 09-06-2005 03:14 AM
ps output Shobhit UNIX for Advanced & Expert Users 2 03-10-2002 09:45 PM

Closed Thread
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
  #1 (permalink)  
Old 02-09-2004
lindeng lindeng is offline
Registered User
  
 

Join Date: Feb 2004
Posts: 6
FTP Output

Hi all,

I've got the following piece of code which performs my FTP functionality. My issue is that despite the fact that both standard out and standard error out are defined, I still get a single line of output on the screen when I run the script. i.e. it may be:

530 Login incorrect.
553 /home/user/testing/test.sh: A file or directory in the path na
me does not exist.

How can I stop these single line messages from appearing? The code I'm currently using is below:

<code>
/usr/bin/ftp -ivn ${DEST_SERVER} << EOF > ${FTP_LOG} 2>&1
user ${DEST_USER} ${DEST_PWORD}
copylocal
put ${FILE} ${DEST_PATH}${tmpTrimFile}
bye
EOF
</code>

The script is written in KSH

Cheers,
Linden
  #2 (permalink)  
Old 02-10-2004
druuna
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
.....

Last edited by druuna; 05-21-2009 at 10:18 AM..
  #3 (permalink)  
Old 02-10-2004
lindeng lindeng is offline
Registered User
  
 

Join Date: Feb 2004
Posts: 6
Hi drunna,

Thanks very much much for your reply. Unfortunately your suggestion didn't help me - I still got the same response outputted to the screen.

I also tried removing the -v flag from ftp, however, all that did was remove the number at the start of the output.
e.g. "530 Login incorrect." became "Login incorrect."


Can anyone shed some light on this for me?

Cheers,
Linden
  #4 (permalink)  
Old 02-10-2004
Perderabo's Avatar
Perderabo Perderabo is online now Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,126
I cannot duplicate your results. My output goes to my log file. And the order of redirection did not matter.

I used ksh on hp-ux 11i.

Are you sure that FTP_LOG is set properly?
  #5 (permalink)  
Old 02-10-2004
druuna
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
.....

Last edited by druuna; 05-21-2009 at 10:18 AM..
  #6 (permalink)  
Old 02-10-2004
lindeng lindeng is offline
Registered User
  
 

Join Date: Feb 2004
Posts: 6
This is quite bizarre (or atleast for me anyway). I tried the ftp piece of code in a script by itself and didn't see the output. (i.e. as I want it). Thus, it's not a machine thing.

I also made sure that the log file was being created correctly, and it was. I'm going in for further testing, but I'm quickly running out of ideas.

Any other suggestions?

Cheers,
Linden

OS: AIX
  #7 (permalink)  
Old 02-10-2004
druuna
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
.....

Last edited by druuna; 05-21-2009 at 10:18 AM..
Closed Thread

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 09:58 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