[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ssh/parallel question
From: |
Ole Tange |
Subject: |
Re: ssh/parallel question |
Date: |
Sun, 30 Jun 2013 16:08:05 +0200 |
On Thu, Jun 27, 2013 at 6:20 PM, James Ward <jimward@us.ibm.com> wrote:
> Let's say I want to run the same program on multiple servers. Which way is
> better?
>
> cat ServerList | parallel ssh -p1602 {} program and arguments
>
> or
>
> parallel -S server1,server2,server3,server4 program and arguments
If you want to run 'echo bar; hostname' on each server you need to
quote the ';' twice if do not use -S:
cat ServerList | parallel ssh {} echo bar\\\; hostname
compared to:
parallel --nonall -S server1,server2 echo bar\; hostname
So to avoid double quoting I would recommend -S or --slf.
/Ole