Operating System - HP-UX
1836131 Members
1890 Online
110095 Solutions
New Discussion

piping using tee command causing script to hang

 
Irfan Ahmed_1
Advisor

piping using tee command causing script to hang

Hi all,

When I execute a very lengthy script file using say, following command

#./filename 2>&1 | tee output_file

Then my script in hanging at exit 1 command.
When I checked out it is tee command which is causing my program to hang.

Can anyone say the reason for this?
Is there some patch to solve this?
This problem is sporadic in nature..

Thanks
-Irfan
3 REPLIES 3
Alex Lavrov.
Honored Contributor

Re: piping using tee command causing script to hang

Hey,
does it happen with all scripts? Can you show us example of the script that fails because of tee ?
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Steve Steel
Honored Contributor

Re: piping using tee command causing script to hang

Hi



1)Look in /var/adm/syslog/syslog.log when this happens for filetable overflow messages or similar

suspect nfile


2)Otherwise you need patches

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Stephen Keane
Honored Contributor

Re: piping using tee command causing script to hang

Have you tried

#./filename 2>&1 | tee -i output_file