![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using Mailx to send to list of email addresses | aguad3 | UNIX Desktop for Dummies Questions & Answers | 1 | 03-28-2008 03:40 PM |
| memory addresses | Paravozzz | High Level Programming | 0 | 10-15-2002 01:17 PM |
| Extracting String from a list | odogbolu98 | Shell Programming and Scripting | 4 | 06-01-2002 03:48 AM |
| Ip Addresses | evil_d00d | IP Networking | 4 | 02-27-2002 03:32 AM |
| ip addresses | dragonslayer100 | IP Networking | 2 | 01-28-2002 08:25 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Help extracting MAC addresses from List
Hello all. I have a large number of text files outputted from various Netstumbler Wireless Scans; from which I need to extract the MAC addresses of the various Access Points. The Text files look like this: Code:
# $Creator: Network Stumbler Version 0.4.0 # $Format: wi-scan summary with extensions # Latitude Longitude ( SSID ) Type ( BSSID ) Time (GMT) [ SNR Sig Noise ] # ( Name ) Flags Channelbits BcnIntvl DataRate LastChannel # $DateGMT: 2008-01-16 N 0.0000000 E 0.0000000 ( belkin54g ) BSS ( 00:11:50:d7:c7:3c ) 16:44:39 (GMT) [ 19 68 49 ] # ( ) 0411 00000800 100 540 11 N 0.0000000 E 0.0000000 ( BUFVC Wireless ) BSS ( 00:03:93:ec:21:93 ) 16:44:39 (GMT) [ 33 82 49 ] # ( ) 0411 00000080 100 540 7 N 0.0000000 E 0.0000000 ( F-Wireless Zone ) BSS ( 00:19:e8:d8:c2:e0 ) 16:44:39 (GMT) [ 24 73 49 ] # ( ) 0421 00002000 100 540 13 What I would like to do is extract the MAC addresses into another text file so that it ends up looking like this: FINAL TEXT FILE Code:
00.11.50.d7.c7.3c 00.03.93.ec.21.93 00.19.e8.d8.c2.e0 I'm pretty new at this whole scripting thing, but I've managed to work our a couple of steps of this process. 1) I can use grep 'N 0.0' to get just the lines with MAC addresses 2) I can probably use tr -d to delete the () around the MAC addresses What I'm failing to be able to do is basically everything else 1) how do I get just the MAC addresses out of that long line? 2) how do I swap the ":" separating the parts of the MAC addresses for "." ? I realise this is probably fairly straight forward, and I've tried looking in the various man pages for the likes of awk, sed and grep, but to be honest they are a little confusing. Any help getting my Wireless Scan text file to look like my hoped for Final text file would be greatly appreciated! Cheers |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|