Saturday, April 27, 2019

command line - to save gnome-terminal in a file

I am using the following command to open a terminal and execute an script. How to save the output to a log file.



gnome-terminal -x bash -c "print1.py; read -n1" &


I tried following options but didn't succeed. Kindly suggest a solution.



gnome-terminal -x bash -c "print1.py; read -n1" & > log.txt
gnome-terminal -x bash -c "print1.py; read -n1" & | tee log.txt
gnome-terminal -x bash -c "print1.py; read -n1" & | tee -a log.txt

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...