Piping commands using Execute command or process.execute...

Post Reply
BuckXUK
Newbie
Posts: 16
Joined: Thu Mar 01, 2012 8:43 pm

Piping commands using Execute command or process.execute...

Post by BuckXUK »

Hello

I've been trying (unsuccessfully) to pipe commands from one command line tool to another using either the Execute command element or (preferably) the process.execute function in the scripting API.

Has anyone been successful in doing this within the scripting API? When I try to pipe a command, it hangs SwitchScripter indefinitely with or without an escaped pipe character.

Any guidance would be appreciated.

Thanks.
Regards,

William Buckingham
bens
Member
Posts: 130
Joined: Thu Mar 03, 2011 10:13 am

Re: Piping commands using Execute command or process.execute...

Post by bens »

Hi Buck,

Piping in Switch scripts is problematic. You might be able to do something with Process.writeToStdin, but to be honest I have not been able to get this to work. The only consistent way I've found to work around this is to put the piping in a bash script (or batch file on Windows), and call that from the Switch script.

Ben
Post Reply