On Fri, 10 Mar 2017, Adam Carter wrote:
> 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}'
> Tnx
pipe to `while read` ?
yourcommand | while read line; do
echo $line
done
--
~ parazyd
GPG: 0333 7671 FDE7 5BB6 A85E C91F B876 CB44 FA1B 0274