On Fri, Dec 28, 2001 at 04:41:42PM -0500, David Kramer <[EMAIL PROTECTED]> wrote:
| 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))}'

or

setap -l | sed -n 's/.*ESSID:"\([^"]*\)".*/\1/p'
-- 
Cameron Simpson, DoD#743        [EMAIL PROTECTED]    http://www.zip.com.au/~cs/

You can never tell our Air Force that," one Vietnamese colonel said.  "The
Air Force always wants to bomb the hamlet.  You tell them, 'Bomb the
treeline, the VC are always in the treeline,'and they pay no attention at
all.  The French were the same way; they always bombed the hamlet, too.
        - Andrew J.Krepinevich, _The Army and Vietnam_.  Baltimore, Johns 
          Hopkins, 1986, p.76.  Blair-Bob says check it out.



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

Reply via email to