pbpaste are the OS X alternatives to the POSIX tool
pbcopy takes the standard input and places it in the specified paste-board. If no pasteboard is specified, the general pasteboard will be used by default.
pbpaste removes the data from the pasteboard and writes it to the standard output.
user@host:~/Projects/some/dir/that/is/long$ pwd | pbcopy
The working directory is now in your system clipboard, available for you to paste somewhere.