The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
Hi How to redirect the output of exec nathgopi214 Shell Programming and Scripting 2 03-23-2008 08:10 AM
Redirect output mpang_ Shell Programming and Scripting 1 08-15-2007 08:57 AM
Redirect output to a file jimmyc UNIX for Dummies Questions & Answers 11 01-31-2007 11:34 AM
Redirect Output In Variable ZINGARO UNIX for Dummies Questions & Answers 1 08-02-2006 06:56 AM
redirect output to file? slackware Shell Programming and Scripting 1 09-12-2003 02:57 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-22-2005
kcaluwae kcaluwae is offline
Registered User
  
 

Join Date: Mar 2005
Posts: 4
redirect output of FTP

Hi,

I call the FTP command from within a script. The call to FTP looks like this :

ftp -n -i -v < $com >> "$logfile"

Where $com is a commandfile
and I want the output to be redirected to $logfile.

If I do this call at the prompt it works perfect. (replacing the variables by there name.

If I run the script the FTP is done (like it should be) but the output does not appear in the logfile. In fact no output is written.

Thanks for any advice!
Best Regards,

Kris
  #2 (permalink)  
Old 06-22-2005
ssk ssk is offline
Registered User
  
 

Join Date: May 2005
Posts: 25
Smile try this

ftp -n -i -v < $com | /bin/tee -a $LOGFILE
  #3 (permalink)  
Old 06-22-2005
kcaluwae kcaluwae is offline
Registered User
  
 

Join Date: Mar 2005
Posts: 4
Thanks for your help ssk.

But I already tried tee. This time I tried once more with the full command "/bin/tee" but I'm afraid it's not the solution.

My logfile still shows the same content.

Best Regards,

Kris
  #4 (permalink)  
Old 06-23-2005
ssk ssk is offline
Registered User
  
 

Join Date: May 2005
Posts: 25
Thumbs down

Kris,
Can you post the command file and also the exact syntax u r using on command line ?
Let me know what is logged at present or nothing is logged. As I checked this command on Sun & HP on both this is working fine.

Regards,

ssk
  #5 (permalink)  
Old 06-23-2005
kcaluwae kcaluwae is offline
Registered User
  
 

Join Date: Mar 2005
Posts: 4
stupid me...

After a good night sleep and a fresh brain I found out that somewhere in the script the directory is switched and as such the logging is working fine. Only that part is put in another logfile (same name other directory)... as the logfile contains only a name and not a full path.

Sorry I bothered you and thanks a lot for your help.
Sponsored Links
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 08:58 PM.


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