Topic "STDIN Redirection with ExecuteCommand?"

Author Message
Doward

Guest


Is there any reason I couldn't use stdin redirection with ExecuteCommand?

ie:

var linuxCommmand = "/opt/ndmcli -x";
var linuxOptions = "sel stat pnum=1 detail=yes;\nquit;";
SSH.ExecuteCommand(String.Format("{0} <<!!\r\n{1}\r\n!!\r\n", linuxCommand, linuxOptions));

Consulting the SessionLog shows the command is correct, with this:

!! ; echo "WinSCP: this is end-of-file:$?"

Thanks!
Doward

Guest


Looks like adding a trailing space to the command fixes it...
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25748
Location: Prague, Czechia
Your duplicate question on Stack Overflow:
http://stackoverflow.com/q/40247207/850848
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License