|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Screen output is blocked by "| tee" command
BACK STORY:
I have a script build.py . (It's for creating the ISO file for a special edition of Swift Linux.) This build.py script executes the mintConstructor.py script that I use to modify the Regular Swift Linux ISO to get the special edition Swift Linux ISO. The lines of the script that do this are: command_remaster = 'python /usr/lib/linuxmint/mintConstructor/mintConstructor.py ' os.system (command_remaster) To create Taylor Swift Linux, I enter in a Bash shell the following command: sudo python /home/username/develop/special/build.py 'ts' 'Taylor Swift Linux' This allows me to see the full screen output of the mintConstructor.py script that is called by the build.py script. Unfortunately, this command doesn't log the output. THE CONUNDRUM: Seeing the mintConstructor.py output on the screen AND logging this output seems to be mutually exclusive. To add insult to injury, the log file is empty UNTIL the entire process is finished. The command I'm using to try to do both is: sudo python /home/username/develop/special/build.py 'ts' 'Taylor Swift Linux' | tee /home/username/develop/test-output/test1.txt THE QUESTION: How can I get the full mintConstructor.py output on the screen AND log this output to a file? |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
You could try the 'script' utility, which captures all terminal output even while it's being displayed to the screen.
|
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Is there a way to get the script command (and the exit at the end) to run AUTOMATICALLY?
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| awk command to replace ";" with "|" and ""|" at diferent places in line of file | shis100 | Shell Programming and Scripting | 7 | 03-16-2011 08:59 AM |
| "Join" or "Merge" more than 2 files into single output based on common key (column) | Katabatic | Shell Programming and Scripting | 1 | 05-20-2010 11:41 AM |
| Explanation of "total" field in "ls -l" command output | proactiveaditya | UNIX for Dummies Questions & Answers | 1 | 04-18-2010 01:40 AM |
| To record screen output using "script" command | ggayathri | Shell Programming and Scripting | 2 | 03-01-2009 02:54 PM |
| Q: Recording shell script screen output using "script" command ? | lalfonso.gomez | Shell Programming and Scripting | 4 | 01-18-2007 08:31 PM |
|
|