Tengo un texto guardado en el portapapeles. Quiero almacenar este texto en un shell script "variable".
Así que algo como:
ls -altr > pbcopy
tmp="something"
pbpaste > $tmp # this doesn't get the ls command output :(
echo $tmp # should not print something