Print comments in FTP


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Print comments in FTP
# 1  
Old 10-10-2005
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 Smilie . Any suggestions?

Many Thanks.

lweegp

Last edited by lweegp; 10-10-2005 at 10:16 PM.. Reason: To add more informations.
# 2  
Old 10-10-2005
Our faq section has an automated ftp job article. Read it.
# 3  
Old 10-11-2005
Hi Perderabo,

I have read and found nothing related to my questions.

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

Thanks.
# 4  
Old 10-11-2005
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.
# 5  
Old 10-11-2005
You can try this

! echo "comments you want "
Notice ! which will take you to calling directory command prompt
# 6  
Old 10-12-2005
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
# 7  
Old 10-12-2005
Double check your log file . It';s working when I am trying from one unix (sunos ) server to another .
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Delete Comments

Hello i am back :D, i have a prolem. I want to Delete the IPs which are in Comments. Input 192.168.0.1 192.168.0.2 #192.168.0.3 #192.168.0.4 - when TAB or Space, delete too. /*192.168.0.5 192.168.0.6 192.168.0.7*\ Output 192.168.0.1 192.168.0.2 My solution is sed -e... (7 Replies)
Discussion started by: eightball
7 Replies

2. Shell Programming and Scripting

print only comments

I want to write a shell script which it takes as argument a java file or a c++ file (.java or .cpp). It will check if the file is type of java or c++, else it ends with error message. If all are ok, it will call awk that prints only the comments that the java or c++ file contains, grouping and... (5 Replies)
Discussion started by: Mark_orig
5 Replies

3. Shell Programming and Scripting

Sed script, changing all C-comments to C++-comments

I must write a script to change all C++ like comments: // this is a comment to this one /* this is a comment */ How to do it by sed? With file: #include <cstdio> using namespace std; //one // two int main() { printf("Example"); // three }//four the result should be: (2 Replies)
Discussion started by: black_hawk
2 Replies

4. Shell Programming and Scripting

delete comments

Delete everything comes in between /* & */. Current File: ==================== create or replace procedure test421 is begin /* ---sasasas/*dsdsds */ dbms_output.put_line('SAURABH'); END; To be File: =================== create or replace procedure test421 is begin... (10 Replies)
Discussion started by: susau_79
10 Replies

5. Shell Programming and Scripting

how to print date using ftp commands

Hi friends sftpCmd.txt ----------------- !echo "Getting files from sftp" !echo "----------------" cd /home/msgGoogle/PLATFORM/PROD/MIMUS/outbound/ARCHIVE/invsnap !echo "folder created" !date mget ???050108*.txt output !echo "------------------" !echo "Completed : " !echo... (3 Replies)
Discussion started by: kittusri9
3 Replies

6. Shell Programming and Scripting

Comments unexpectedly print

Hi All, I am working on a sh script. Half way through the script, my comments start to print to screen as if I used echo. Obviously any comments are preceded with a #. And I have not used set -x or anything similar. Can anyone free me of this simple but annoying problem? Thanks John (5 Replies)
Discussion started by: John H
5 Replies

7. UNIX for Dummies Questions & Answers

FTP a print job that's still in queue?

I have an HP-UX system that has remote print queues created on it. We're having trouble with the data so I stopped the queue from sending its data to the recieving server. I typed "lpstat -o<queue> " and I see two print jobs listed c_91428.1 and c_91429.1 but when I go to the /usr/spool/<queue>... (2 Replies)
Discussion started by: HVHS_CJR
2 Replies

8. UNIX for Dummies Questions & Answers

Remove comments...

It may be a no-brainer, but the answer is escaping me right now: I'm trying to write a little script to remove all comments from .c source... I was thinking sed, but I'm not a very strong regexp user (e.g. I suck with sed). I tried dumping the file into: sed -e 's/\/\* * \*\///g' and several... (1 Reply)
Discussion started by: LivinFree
1 Replies
Login or Register to Ask a Question