I have some text stored on my clipboard. I want to store this text onto a shell script "variable".
So something like:
ls -altr > pbcopy
tmp="something"
pbpaste > $tmp # this doesn't get the ls command output :(
echo $tmp # should not print something