On RH 6.7, using bash
:
I need to free up some IP addresses using a script.
I am looking for a way to shutdown the bonding using the ifconfig xxx down
command.
I search for list of candidate using this:
$ ifconfig |grep ^bond[0-9]:[1-9] |awk '{print $1}'
How may I easily use the output from this command to the down
command?
xargs
did not work for me:
$ ifconfig |grep ^bond[0-9]:[1-9] |awk '{print \$1}' | xargs -n 1 ifconfig down
Thanks
ifconfig
in your question? – Rahul Jun 26 '16 at 11:39$1
? – Ralph Rönnquist Jun 26 '16 at 11:49