On Fri, 28 Dec 2001, Patrick Nelson wrote:

> For some reason I just cant get this...
> 
> me@mehost>setap -l | grep ESSID:   # lists the following
> lo        no wireless extensions.
> 
> eth0      IEEE 802.11-DS  ESSID:"MECOOLAP01"  Nickname:"mehost"
> me@mehost>
> 
> I'm trying to figure out how to pull the MECOOLAP01 from the line.  Any
> suggestions?

setap -l | perl -ne 'if(/ESSID:"(.*?)"/) {print("$1\n");}'

or 

setap -l | awk '{print(substr($4,8,length($4)-8))}'

-------------------------------------------------------------------
DDDD   David Kramer                           http://thekramers.net
DK KD  
DKK D  "God grant me a good sword and no use for it."
DK KD  
DDDD                                               - Polish Proverb



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to