pbpaste, pbcopy using wrong pasteboard? I'm converting a shell script which xclip and similar tools on Linux, to use pbpaste and pbcopy on Mac. The problem is the default pasteboard ('general' according to the man-page) for these tools is not the one being used by Stickies / Safari / TextMate / all the GUI apps.

I've tried all the pasteboard names mentioned in 'man pbpaste' but none contain the data I copy in any GUI app. If I load data into the 'general' pboard using 'pbcopy' I can extract it fine via 'pbpaste' - but it's separate from the GUI pasteboard.

Note I'm not running any unusual shell, Terminal or WindowServer settings, this is standard 10.7 Terminal and bash.
Check your bash aliases - is something aliasing pbcopy/pbpaste to use one of the other pasteboards?

The manpage for these commands mentions four possible pasteboards that they can use - general, ruler, find, and font. Try pbcopy -pboard general to force it to use the general pasteboard.