Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Preface: I've added alias airport="sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport" to my .zshrc.

myuser:~/ $ airport prefs                                            [17:19:30]
AirPort preferences for en1:

DisconnectOnLogout=NO
JoinMode=Automatic
Unable to retrieve JoinModeFallback
RememberRecentNetworks=YES
RequireAdminIBSS=NO
RequireAdminNetworkChange=NO
RequireAdminPowerToggle=NO
WoWEnabled=YES

myuser:~/ $ airport prefs | grep "JoinMode="                         [17:20:36]
Unable to retrieve JoinModeFallback
JoinMode=Automatic

Why doesn't this grep filter out the JoinModeFallback line?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Because pipes only work on stdout by default. That line is an error message being sent to stderr.

share|improve this answer
    
Oh, I didn't know! I wish I had a good way of highlighting stderr. –  2rs2ts Jun 11 '13 at 0:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.