Since I'm bouncing between OSX and Linux a lot, I have a shell script with the same name on each that boils down to:
if [ `uname` == "Darwin" ]; then
pbcopy
else
xsel --clipboard
fi