Am Fri, 10 Mar 2017 14:05:02 +1100
schrieb Adam Carter <adamcart...@gmail.com>:

> I have one command that dumps out a number of lines of output, and i
> want to have another command run multiple times taking a single line
> contents as its argument(s) each time. From what i understand of
> xargs it takes all the piped input and runs a command once with each
> of the piped inputs as another argument.
> 
> Eg. say i want to run ethtool against each active interface dumped
> out by; ifconfig | grep ^[a-zA-Z] | awk '{print $1}'

I prefer piping such "one file name per line" outputs to the following
construct:

... | while read line; do command "$line"; done

-- 
Regards,
Kai

Replies to list-only preferred.


Reply via email to