gregwebs / Shelly.hs

Haskell shell scripting
BSD 3-Clause "New" or "Revised" License
418 stars 88 forks source link

Adding parallell execution of ssh commands #153

Closed Haskell-mouse closed 6 years ago

Haskell-mouse commented 7 years ago

Added functions sshPairsP, sshPairsP_ and one more option to sshPairsWithOptons' - Mode. Mode can be Seq or Par. In first case commands are combined with " && ", in second case they are combined with " & " before given to ssh. It allows you to run ssh commands in parallell. It was very useful in my own task, so - i hope that it can be useful to others.

gregwebs commented 6 years ago

In my test ssh properly waited until all commands had been run

ssh server -- '(sleep 3 && echo hello)&; echo goodbye'