![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to get exit code in a pipe-lined command? | pankai | Shell Programming and Scripting | 3 | 01-10-2008 03:36 PM |
| How can I use pipe command ? | bintaleb | UNIX for Dummies Questions & Answers | 11 | 04-16-2007 12:16 PM |
| pipe command | zomboo | UNIX for Dummies Questions & Answers | 1 | 10-31-2004 03:04 PM |
| ret val of a command in a pipe which is NOT the last one | latze | Shell Programming and Scripting | 5 | 11-01-2002 07:32 AM |
| How to pipe command | anonymous.nico | UNIX for Advanced & Expert Users | 4 | 03-20-2002 12:06 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
hi there all the unix-gurus,
anyone can offer me some advise/help? i'm writing a ftp script and i need to spool out the output to a file but i'm facing some problems when i'm doing the following: ftp -n <mail server> ${log_dir}/test_put.log << END user <user_id> <password> verbose bin # Before putting the A0 Data pwd >> ${log_dir}/test_put.log dir >> ${log_dir}/test_put.log it gives me this output which i do not want: drw-rw-rw- 1 ftp ftp 0 Oct 10 14:26 . drw-rw-rw- 1 ftp ftp 0 Oct 10 14:26 .. I don't see all the files listed. Anyway to resolve this? Thanks. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
When you do <<END you are sending the next lines into the ftp program. The ftp program knows what "dir" means while the shell does not. But the ftp program has no idea at all what "dir >> ${log_dir}/test_put.log" means. Yes, it knows "dir". But the rest of that lines is gibberish. Just do "pwd" and "dir". You are already sending the output of ftp into that log file.
|
|
#3
|
|||
|
|||
|
Hi Perderabo,
Many thanks for the solution. It works perfectly fine. Thanks again =) |
|||
| Google The UNIX and Linux Forums |