![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| How to build a command into a string rather than execute the command | littlejon | Shell Programming and Scripting | 1 | 05-29-2008 08:05 PM |
| WRQ Reflection SFTP process hangs when run using windows scheduler | kapilash | Windows & DOS: Issues & Discussions | 0 | 04-27-2006 05:26 AM |
| Plz Help : How to use write command to execute command on some other terminal | Aashish | UNIX for Dummies Questions & Answers | 2 | 03-03-2006 12:25 PM |
| Track Sftp process | borncrazy | Shell Programming and Scripting | 9 | 12-13-2005 02:50 AM |
| execute command unix with java:possible or not? | mips | Shell Programming and Scripting | 4 | 05-13-2004 07:07 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
To execute next UNIX command after ending SFTP process.
Hi,
I am trying to run a simple UNIX command after i successfully executed SFTP command as shown below. ----------------------------------------- echo 'Step-1' sftp -vvv -b path exit echo 'Step-2' ------------------------------------------ In above script it executes from the 1st 'echo' command till the 'exit' then comes out of the script. But my requirement is to also execute the 2nd 'echo' command. So is there a way to run further UNIX command after SFTP, even by calling another script to run further command is fine. Thanks for your help.. |
|
||||
|
Skip the exit. If you are echoing your ftp-style commands, pipe it through to sftp:
Code:
echo "put $myfile $hostdest/$hostfile" | sftp $verbosity $hostpass $hostuser@$hostname >>$MYLOG 2>&1 Code:
scp $loclfile $hostuser@$hostname:$trgtdir/. |
|
||||
|
To execute next UNIX command after ending SFTP process.
My problem is not in using SFTP command, but not able to execute any UNIX command after i successfuly completed SFTP. Currently it exits out of script after SFTP command, which i need to use. Is there a way to exit out of SFTP ?
Thanks |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|