I run a script: python my_script.py. It outputs a bunch of lines in the terminal. I forgot to use the output command: python my_script.py > file.txt. Is it possible to get the recent output to the screen into a file, other than with copy-paste?
Asked
Active
Viewed 62 times
0
DevShark
- 103
1 Answers
0
Bash only keeps a history of the commands you entered. You can retrieve it by entering history Bash never stores the output of these commands , so the copy/paste option is the only hope for you.
storm
- 4,973
>before you even started ( :) ), you could use thescriptcommand of course. http://askubuntu.com/questions/161935/how-do-i-log-all-input-and-output-in-a-terminal-session – Jacob Vlijm Apr 06 '16 at 12:50