I have been using Mac OS X in one flavor or another for over 4 years now. I make extensive use of the terminal, scripts and general UNIX automation in my workflow. For example I use a large collection of scripts to massage data and format it. Some of these scripts use an SQL query to rip data from bugzilla to build a report. The most common thing I do with these reports is convert them to mediawiki table markup and toss them on a wiki page as a status snapshot or other tabular form presentation.
This has proven awkward as I run my script, put it in a temporary file, open the file in TextEdit and select-all and paste into the web-browser window that is editing the wiki page. I remember from my X11 days there was a utility to load stdin and stdout to the ‘cut buffer’. Can we manipulate OS X’s paste board from the CLI?
Yup. man pbcopy
RTFM on this fine fellow: pbcopy. In fact, pbcopy also has pbpaste as a friend.
These commands let your source (from the paste board) and sink (to the pasteboard) your standard input.
So now, my workflow is more like:
$ script | pbcopy
And then I can immediately paste into the web browser form.
A very handy improvement on efficiencies.



