Gentoo Archives: gentoo-user

From: Adam Carter <adamcarter3@×××××.com>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: [gentoo-user] OT: shell question, maybe xargs?
Date: Fri, 10 Mar 2017 03:05:15
Message-Id: CAC=wYCEBXkuF-+NKpUDC3eZrMPXACOKjiPXdK5X4JDTqJ8fn6g@mail.gmail.com
1 I have one command that dumps out a number of lines of output, and i want
2 to have another command run multiple times taking a single line contents as
3 its argument(s) each time. From what i understand of xargs it takes all the
4 piped input and runs a command once with each of the piped inputs as
5 another argument.
6
7 Eg. say i want to run ethtool against each active interface dumped out by;
8 ifconfig | grep ^[a-zA-Z] | awk '{print $1}'
9
10 Tnx

Replies

Subject Author
Re: [gentoo-user] OT: shell question, maybe xargs? parazyd <parazyd@××××.org>
Re: [gentoo-user] OT: shell question, maybe xargs? Alexander Kapshuk <alexander.kapshuk@×××××.com>
[gentoo-user] Re: OT: shell question, maybe xargs? Jonathan Callen <jcallen@g.o>
[gentoo-user] Re: OT: shell question, maybe xargs? Kai Krakow <hurikhan77@×××××.com>