Easiest way to strip newline character from input string in pasteboard

pwd | tr -d '\n' | pbcopy


printf $(pwd) | pbcopy

or

echo -n $(pwd) | pbcopy

Note that these should really be quoted in case there are whitespace characters in the directory name. For example:

echo -n "$(pwd)" | pbcopy