How can I always save the output of the last command to a file?

12 Views Asked by At

I want to always save the output of the last command to a file, like ~/.last_command.txt

The answer must be some kind of function that is always called when executing any command.

I've searched high and low for this, but the answers are more geared towards not always saving the output.

0

There are 0 best solutions below