Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

iwconfig / ifconfig |grep odd 1

Status
Not open for further replies.

tjbradford

Technical User
Dec 14, 2007
229
GB
I want to Grep the output of the iwconfig and shutdown any adaptors it finds easy , well if you do ifconfig |grep TX it will display 2 line both of which contain the word TX

however if i do iwconfig |grep Radio
i get the whole iwconfig followed then the matching statement.

I want to be able to grep the word radio and when it finds run awk on it to obtain $1 eg eth0 and then run a ifconfig eth0 down command.

i guess the question is why is it outputting all that unwanted stuff with the grep in place?

Many thanks
 
lovely job , cheers for that , i have never come across this before , very handy thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top