Copy terminal output to Mac clipboard?

Use pbcopy:

echo foo | pbcopy

Also see man pbcopy for info on it and pbpaste.