I have seen this post: how-can-i-copy-the-output-of-a-command-directly-into-my-clipboard
I have got this alias
# Redoes the last command and copies the output to clipboard
alias cl="fc -e -|pbcopy"
However I would like an alias or a function that doesn't redo the last command, but does copy the output of the last command.
try this,
or so if you want alias