• Post Reply Bookmark Topic Watch Topic
  • New Topic

tee not terminated  RSS feed

 
Mahesh Mamani
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am executing the following commands in ksh script:
main1.sh
--------
echo "Start.."
run_sh 2>&1 | tee -a outputfile
echo "Done."
run_sh
------
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.

MSM
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Snigdha Solanki
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The sequence of print statements should be like
this:
Start..
start run_sh
End run_sh
Done
What is the sequence you are getting?
Thanks
 
Mahesh Mamani
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The last statement "Done." is not ouputted

MSM
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!