Reputation: 3619
Need to keep a copy of what has been already output to the screen (i.e. the standard output), in shells of both Linux and OS X. Better if the colored text can be kept.
Upvotes: 1
Views: 456
Reputation: 122391
Run your command through tee
(manpage):
$ mycommand | tee ~/Documents/output.txt
This will output to both the screen and to the file specified on the tee
command line and will work in any terminal session (i.e. ssh, not just Terminal.app).
Upvotes: 1
Reputation: 781028
Use the menu command Shell > Export Text As...
.
You can also use the Unix script
command to save everything automatically as it's happening.
Upvotes: 1