![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Want To convert script in Linux format | niceboykunal123 | Shell Programming and Scripting | 1 | 05-28-2008 09:27 AM |
| How to convert a single column into several rows and columns? | ashton_smith | UNIX for Dummies Questions & Answers | 5 | 05-24-2008 05:44 PM |
| script to convert absolute date | onthetopo | UNIX for Dummies Questions & Answers | 2 | 07-06-2007 08:37 PM |
| how to convert unix .ksh script to windows .batch script | 2.5lt V8 | Shell Programming and Scripting | 1 | 11-28-2006 12:52 PM |
| Convert a paragraph to single line | rimss | Shell Programming and Scripting | 6 | 06-07-2006 04:17 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
here-doc convert 2 script convert to single script?
I have my main script calling another script to retrive a "ls -alt" of a directory that's located in a remote location I'm sftping into. main.sh Code:
#!/bin/ksh getLS.sh > output.txt getLS.sh Code:
#!/bin/sh /home<..>/sftp <host@ip> <<! cd /some/dir/Log ls -alt quit ! Basically I'd like to be able to combine the second script into the first and not have to call a second script. Would this work? Code:
#!/bin/sh /home<..>/sftp <host@ip> <<! cd /some/dir/Log ls -alt quit ! > output.txt If it does work, why does it work? I've always been using the stdout redirect like this: command > output.. I didn't know you could do command1 command2 command3 > output.. Last edited by yongho; 07-07-2005 at 05:05 PM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|