Formatting phone numbers right from the clipboard using sed
So, I needed a quick way to format several phone numbers in a series of web fields where import/export wasn’t really a viable option.
One of the great things about OS X and it’s Unix-y underpinnings is that I was able to cobble together a single command line like this to run a regex right on the clipboard contents… Basically pull it in, pipe it through sed, and then push it back onto the clipboard.
So CMD+A/CMD+C, run script, CMD+V, done.