Execute shell script within sftp session


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Execute shell script within sftp session
# 1  
Old 10-28-2011
Error Execute shell script within sftp session

Hi all ,

can any one tell me how to run a script within a sftp session. let me tell u in bit clear way :

After I connected to sftp location , cd ing to some directory then I need to execute a one script. Please tell me if u have any idea on this .

Looking forward to your reply guys Smilie
# 2  
Old 10-28-2011
you can execute commands in a local shell by typing !<command> or by typing ! on its own to escape to a local shell.
the only other way is to have a script whcih performs the commands you want on the remote host and send the information back to you, just use ssh or telnet to the box and execute .
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Execute a script after SFTP transfer

Hi All, I am having an issue with the script execution. I am having a SFTP process that send files to a location . I want to execute a script once it transfer the file to that location. Right now I am leveraging autosys file watcher to do that. Is there any way like MFT PPA that can execute... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies

2. Shell Programming and Scripting

Informatica post session shell script

Hi, This is regarding a issue we are facing in informatica post session. We place a shell script in informatica job. The shell script will need to upload a dummy file to another server.The shell script is running fine.However in informatica job not completing and throwing error It's... (1 Reply)
Discussion started by: nag_sathi
1 Replies

3. Shell Programming and Scripting

i want to execute shell script on remote server with in sftp session

Hi, I want to execute shell script with in sftp session for remote server. like i have a shell script test.sh that is on local server.i want to execute that script on remote server sftp user@192.168.56.10 sftp> test.sh ---execute for remote server not for local server. sftp... (3 Replies)
Discussion started by: SAUD PASHA
3 Replies

4. Shell Programming and Scripting

SFTP-how to log individual sftp command error while executing shell script

Hi, I have situation where i need to automate transferring 10000+ files using sftp. while read line do if ; then echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt fi done< files.txt sftp -b sftpCommand.txt stu@192.168.2.1 The above... (1 Reply)
Discussion started by: noobrobot
1 Replies

5. UNIX for Dummies Questions & Answers

script help shell session times out

while read s1 ; do url= suf=ignore=.csv; wget $url$s1$suf; sleep 5; cat /home/joey/public_html/charts/program/fn\charts/data/tickers/header.txt > $s1.txt; chmod 777 $s1.txt; sed '1d' table.csv?s\=$s1 >> /home/joey/public_html/charts/program/charts/data/tickers/$s1.txt; rm -Rf... (0 Replies)
Discussion started by: harte
0 Replies

6. Shell Programming and Scripting

How to use ssh execute other shell script on other host (shell script include nohup)?

i want use ssh on the host01 to execute autoexec.sh on the host02 like following : host01> ssh host02 autoexec.sh autoexec.sh include nohup command like follwing : nohup /home/jack/deletedata.sh & after i execute ssh host02 autoexec.sh one the host01. i can't found deletedata.sh... (1 Reply)
Discussion started by: orablue
1 Replies

7. Shell Programming and Scripting

Execute commands from script in current bash session

I have a file as follows: cat /etc/mxg/ssh-hostsmx.example1.com.au:2225 mx2.example2.com.au:2225 mx.example3.com.au:2225 mail.example4.com.au:2225 mail.example5.org.au:2225 mail.example6.com.au:2225I want to dynamically create aliases for quick access to these servers from bash. I wrote... (4 Replies)
Discussion started by: jelloir
4 Replies

8. Shell Programming and Scripting

session timeout for shell script

I am executing test.sh script. But this script takes lot of time and in the meantime the shell timeouts without completing the script. Is there any command which will continue processing the script. Thanks (3 Replies)
Discussion started by: infyanurag
3 Replies

9. Shell Programming and Scripting

execute shell commands with in sftp

Hi All, Please let me know how do I execute some of the shell commands like cat, find ,grep within sftp. Any help in this regard would be greatly appreciated. Thanks, (5 Replies)
Discussion started by: tommy1
5 Replies
Login or Register to Ask a Question