How to get user input executing a remote shell script

Advertisement

ivarodr
Joined:
Posts:
6
Location:
Spain

How to get user input executing a remote shell script

Hi, i am executing a shell script with the command "call myScript.sh" in which i ask some user input.
My question is: How can i get this user input?.
The problem is that it is impossible to send data to the console, it seems that the console is stalled.

THX.

Reply with quote E-mail

Advertisement

ivarodr
Joined:
Posts:
6
Location:
Spain

Ok, it is impossible

call
With SFTP and SCP protocols, executes arbitrary remote shell command. With FTP protocol, executes a protocol command.

call <command>
If current session does not allow execution of arbitrary remote command separate shell session will be automatically opened.

The command must not require user input.

Alias: !

XML Log Element: call

Examples:

call mysqldump --opt -u USERNAME --password=PASSWORD --all-databases > all_databases.sql
call gzip -c all_databases.sql > all_databases.gz

Then there is no way to save this pissue??

Reply with quote E-mail

martin
Site Admin
martin avatar
Joined:
Posts:
29,069
Location:
Prague, Czechia

Re: Ok, it is impossible

ivarodr wrote:

Then there is no way to save this pissue??
You would have to collect the input prior to starting the WinSCP script and pass it at command-line argument to your shell script.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum