tjbradford
Technical User
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
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