Skip to content

Instantly share code, notes, and snippets.

@jtbrough
Created January 21, 2014 03:46
Show Gist options
  • Save jtbrough/8534168 to your computer and use it in GitHub Desktop.
Save jtbrough/8534168 to your computer and use it in GitHub Desktop.
# de-munge email address
#
# accepts a munged email address in one of the following formats (in this case piped from the OS X clipboard)
# 1) something at domain dot com
# or
# 2) something at domain (dot) com
# all spaces will be removed
#
echo `pbpaste` | sed -e 's/ at /@/' -e 's/ dot /./' -e 's/ (dot) /./' -e 's/ //g'
# munge email address
#
# accepts a standard email address (in this case piped from the OS X clipboard)
# expected email format [email protected]
#
echo `pbpaste` | sed -e 's/@/ at /' -e 's/[.]/ (dot) /'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment