OS X (built in)
- echo ‘lol’ | pbcopy
- pbpaste > file.txt
Ubuntu (install xsel via apt)
- xsel –clipboard < new-clipboard-contents.txt
- xsel –clipboard > current-clipboard-contents.txt
Now I have one very good reason to never install anything again in “Program Files (x86)” folder where 64-bit Windows XP usually puts 32-bit apps. The reason is closing bracket character “)” in path, which in combination with “special” behavior of windows cmd.exe shell can (and will) give you a lot of pain in the neck if you do shell scripting (under Win AKA batch scripting). And even if you don’t do shell scripting yourself, some shell scripts that you or any soft you use might need to run, may break.