File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes tee not terminated Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "tee not terminated" Watch "tee not terminated" New topic

tee not terminated

Mahesh Mamani
Ranch Hand

Joined: Jun 25, 2001
Posts: 110
I am executing the following commands in ksh script:
echo "Start.."
run_sh 2>&1 | tee -a outputfile
echo "Done."
echo "start run_sh"
my_no_ending_program &
echo "End run_sh"
The output would only stop at "End run_sh" which means run_sh script
is fully executed. But it just would print out "Done." and end the
main script.
Anyone has any pointer and advice to workaround this problem? Thanks.

Frank Carver

Joined: Jan 07, 1999
Posts: 6920
I can't quite understand what you want this to do or what it is actually doing. Please show us the sequence of output messages you expect, end the sequence of output messages you got. Thanks.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Snigdha Solanki
Ranch Hand

Joined: Sep 07, 2000
Posts: 128
The sequence of print statements should be like
start run_sh
End run_sh
What is the sequence you are getting?

Snigdha<br />Sun Certified Programmer for the Java™ 2 Platform
Mahesh Mamani
Ranch Hand

Joined: Jun 25, 2001
Posts: 110
The last statement "Done." is not ouputted

I agree. Here's the link:
subject: tee not terminated
It's not a secret anymore!