Run a command via ssh with Shelly/Turtle

595 Views Asked by At

Given a command:

ssh user@host command

where command, when executed on the remote host host, should be:

somecmd --option1 'option value with spaces' 'arg1 with spaces' 'arg2 with weird chars, like ('

How can I execute this command using the Haskell Shelly or the Haskell Turtle?

Shelly provides a sshPairs, but it didn't quote command correctly.

Quoting in a bash script can be fragile, does these two libraries, (or any Haskell libraries, for that matter), tries to improve this?

0

There are 0 best solutions below