Skip to content

Instantly share code, notes, and snippets.

@meoso
Created June 23, 2015 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meoso/4b8b5439569e662ee18a to your computer and use it in GitHub Desktop.
Save meoso/4b8b5439569e662ee18a to your computer and use it in GitHub Desktop.
process oui.txt - two different ways / about the same elapsed time
curl -O http://standards-oui.ieee.org/oui.txt
time cat oui.txt | awk '/(base 16)/ {printf $1 ":"; for(i=4;i<=NF;i++) printf "%s", $i (i==NF?ORS:OFS)}'
time cat oui.txt | grep -F "(base 16)" | awk '{$2=$3="" ; print $0}' | awk -F" " '{print $1 ":" $2}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment