[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Prefix each line with "input line"
From: |
Ole Tange |
Subject: |
Re: Prefix each line with "input line" |
Date: |
Mon, 3 Oct 2011 00:04:49 +0200 |
On Sun, Oct 2, 2011 at 12:15 PM, Hans Schou <chlor@schou.dk> wrote:
>
> Hi
>
> I have a number of servers and sometimes I want to check a setting on all of
> them. Like "what is the default search domain".
>
> For convenience I have all the server names in the environment:
> export srv_all="example.org example.com"
> (could be in a file, but environment is always at hand)
> Then I get the answer by running:
> parallel ssh {} "grep search /etc/resolv.conf" ::: $srv_all
> and the output:
> search example.org
> search example.xxx
The idea of --onall/--nonall is to never write 'parallel ssh {}'.
Instead you will keep the list of servers in .profile/sshloginfile or
you will use -S to select a different file or --profile to select a
different profile.
Please test --tag (from git version beef9c1) and see if that solves your issue:
parallel -S .. --tag --nonall run this
parallel -S .. --tag --onall run this ::: with these args
/Ole