The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Perform action file name written to the pipe fed.linuxgossip Shell Programming and Scripting 2 07-23-2008 07:38 AM
How to clear the content of a pipe (STDIN) after it is written to another program? vvaidyan High Level Programming 10 05-15-2008 04:08 PM
how to read the data from an excel sheet and use those data as variable in the unix c Anne Grace UNIX for Advanced & Expert Users 1 03-03-2008 04:21 AM
Problem in read() from a pipe JDS High Level Programming 2 10-13-2006 07:19 AM
check written data Hitori Linux 0 07-22-2006 05:46 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 04-18-2005
Registered User
 

Join Date: Mar 2005
Posts: 22
AIX 5.3 - There is no process to read data written to a pipe

I have the following code which works on AIX 4.3 but fails at times on AIX 5.3
with:

cat: 0652-054 cannot write to output. There is no process to read data written to a pipe.


Code:
validator="${validator_exe} ${validator_parms}"
               cmd_line="${CAT} ${data_file} | ${validator} 2>${validator_errors}"
               if [ "${create_new_files}" = "Y" ]
               then
                  #
                  # update the command-line to redirect the translated data to a file
                  #
                  cmd_line="${cmd_line} 1> ${new_file}"
                  print "         Input file : ${real_data_file}"
                  print "         Output file: ${new_file}"
               fi
               #
               # run the validator and save the return code
               #
               eval ${cmd_line}
               validator_rc=$?
If I switch the code to use a redirect instead of a pipe for the following line of code it works everytime.

From This:
Code:
cmd_line="${CAT} ${data_file} | ${validator} 2>${validator_errors}"
To This:
Code:
cmd_line="${validator} < ${data_file} 2>${validator_errors}"
Does anyone know anything about why this might occur.

Last edited by vigsgb; 04-18-2005 at 07:59 AM.
Reply With Quote
Forum Sponsor
  #2  
Old 04-20-2005
Just Ice's Avatar
Lights on, brain off.
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 629
methinks your "validator" maybe having issues handling input from a pipe since the no-pipe command line always works ... check your "validator" for the bug ...
Reply With Quote
  #3  
Old 04-21-2005
Registered User
 

Join Date: Mar 2005
Posts: 22
I just had this issue occur on a .sh script with the following command:

Code:
cat $filename | head -1
Same thing, change to

Code:
cat $filename > head -1
and it works.

Both of these examples I listed in this post so far, did run for without issues on an AIX 4.3 using sp2 nodes.

I am migrating to P5 running aix 5.3 and that is where the issues are occuring.

I guess it is time to have IBM take a look at this.

Thanks
Reply With Quote
  #4  
Old 06-13-2006
Registered User
 

Join Date: Jun 2006
Posts: 1
Question

Hi Unix gurus,
I have problem executing remote ssh from cygwin on WIN XP SP2. I have the the public key in the host to have SSH login without the need of password.
I am sure this is not due to path or environment as I can run this within the shell and I added PATH and all necessary LIBPATH within the script.


From windows DOS prompt, i am executing:
ssh user@host /home/user/tmp/prog.ksh


output:

*******************************************************************************
* *
* *
* Welcome to AIX Version 5.2! *
* *
* *
* Please see the README file in /usr/lpp/bos for information pertinent to *
* this release of the AIX Operating System. *
* *
* *
*******************************************************************************
exec(): 0509-036 Cannot load program /home/user/util/bin/tracking because of the following errors:
0509-150 Dependent module liborbixmt.so could not be loaded.
0509-022 Cannot load module liborbixmt.so.
0509-026 System error: A file or directory in the path name does not exist.
/home/user/tmp/prog.ksh: There is no process to read data written to a pipe
Reply With Quote
  #5  
Old 06-21-2006
Registered User
 

Join Date: Nov 2001
Posts: 33
vigsgb : the only thing i know about that is your file may be bigger than 2 gb
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:00 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0