Skip to content

Instantly share code, notes, and snippets.

@HokieGeek
Last active August 12, 2016 02:40
Show Gist options
  • Save HokieGeek/94612805798b29e351a29ab0414098ab to your computer and use it in GitHub Desktop.
Save HokieGeek/94612805798b29e351a29ab0414098ab to your computer and use it in GitHub Desktop.
Want to remember to do this...
#!/bin/bash
IFS='-'; for v in $1; do
[[ $v =~ ^([0-9]{2}\.?){3}$ ]] && { echo $v; break; }
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment