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
Scripting comments gliesian Shell Programming and Scripting 4 03-28-2008 05:32 AM
OMG BPMN 2: comments for CEP iBot Complex Event Processing RSS News 0 03-11-2008 09:20 AM
Comments unexpectedly print John H Shell Programming and Scripting 5 04-11-2007 04:56 PM
Remove comments... LivinFree UNIX for Dummies Questions & Answers 1 10-11-2001 06:43 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-10-2005
Registered User
 

Join Date: Oct 2005
Location: singapore
Posts: 86
Question Print a comment line for FTP script

Dear Unix Gurus,

Not sure if this is possible/workable but I'm trying add a comment line before each operation such as the following:

ftp -n <mail server> ${log_dir}/test_put.log << END
user <user_id> <password>
verbose
bin
# List Files Before putting Data
echo File Check Before FTP >> ${log_dir}/test_put.log
pwd
echo File In Directory >> ${log_dir}/test_put.log
dir

But I dont think this is working . Any suggestions?

Many Thanks.

lweegp

Last edited by lweegp; 10-10-2005 at 06:16 PM. Reason: To add more informations.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-10-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,355
Our faq section has an automated ftp job article. Read it.
Reply With Quote
  #3 (permalink)  
Old 10-10-2005
Registered User
 

Join Date: Oct 2005
Location: singapore
Posts: 86
Hi Perderabo,

I have read and found nothing related to my questions.

Can I use the "print -p" to print out comment line?

Thanks.
Reply With Quote
  #4 (permalink)  
Old 10-11-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,355
Quote:
Originally Posted by lweegp
Hi Perderabo,

I have read and found nothing related to my questions.

Can I use the "print -p" to print out comment line?

Thanks.
No, but you can use "print" to print out a comment line. And you can intersperse "print" and "print -p" lines at will.
Reply With Quote
  #5 (permalink)  
Old 10-11-2005
Registered User
 

Join Date: Sep 2005
Posts: 36
You can try this

! echo "comments you want "
Notice ! which will take you to calling directory command prompt
Reply With Quote
  #6 (permalink)  
Old 10-11-2005
Registered User
 

Join Date: Oct 2005
Location: singapore
Posts: 86
hi akrathi,
this is my script, it dont seems to work. something wrong somewhere?

ftp -n <mail server> > <log_dir>/test_put.log << END
user <userid> <passwd>
verbose
bin

!echo "Before putting the A0 Data"
dir
mput A0*
bye
END
Reply With Quote
  #7 (permalink)  
Old 10-12-2005
Registered User
 

Join Date: Sep 2005
Posts: 36
Double check your log file . It';s working when I am trying from one unix (sunos ) server to another .
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:00 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0