View Single Post
Old 03-05-2004, 01:00 AM   #3 (permalink)
Silvy
paranoid
 
Silvy's Avatar
 
Location: The Netherlands
Thanks, I'll have a look-see!

Edited the spelling of the subject line too, too bad it doesn't update the Board thread listing

EDIT: yes, `tee` works fine!

Thanks a lot , it works a lot better than my 'ugly' solution...

In case anyone is interested: this is the script I tested it with:
replace "some_long_command" by a command that takes a long time to execute and produces output during execution. (I used un-tar on a large file)

Code:
#!/bin/bash
OUTPUTFILE=output.txt
COMMAND="some_long_command |tee $OUTPUTFILE" 
echo $COMMAND  
eval $COMMAND
__________________
"Do not kill. Do not rape. Do not steal. These are principles which every man of every faith can embrace. "
- Murphy MacManus (Boondock Saints)

Last edited by Silvy; 03-05-2004 at 01:51 AM..
Silvy is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52