Skip to content

Commit

Permalink
Merge pull request angryip#200 from Zwilla/patch-1
Browse files Browse the repository at this point in the history
missing sed -r option on OSX
  • Loading branch information
angryziber authored Sep 5, 2019
2 parents 7abc1fa + ffc2c97 commit ae63761
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion update-mac-vendors.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
#!/bin/bash
# This scripts downloads and optimizes IEEE MAC vendor list
#
# FILE: update-mac-vendors.sh
# Mac users: Install Gnu-Sed via brew install gnu-sed then change sed into gsed (why? Option -r did not exist on OSX)(cheers Zwilla)

SED_APP='sed'
if [ "$(uname)" = "Darwin" ]; then
brew install gnu-sed;
SED_APP='gsed';
fi

curl 'http://standards-oui.ieee.org/oui.txt' |\
#cat oui.txt |\
fgrep '(base 16)' | sed -r '
fgrep '(base 16)' | $SED_APP -r '
s/\r//g; s/ \(base 16\)\t\t//
s/,? ?(Inc)\.?$//I
s/(,|, | )(Ltd|Limited|GmbH|LLC|A\/S|AB|AS|SAS|AG|KG|PLC|SRL|OY|Oy|BV|Nederland BV|SAN VE TIC)\.?$//Ig
Expand Down

0 comments on commit ae63761

Please sign in to comment.