Sponsored Content
Full Discussion: Broken Pipe error
Top Forums Programming Broken Pipe error Post 302407134 by arunkumar_mca on Wednesday 24th of March 2010 03:59:00 PM
Old 03-24-2010
Broken Pipe error

All,

I am using the below code

The C code :



Code:
if ((fp2=fopen(szout_fname,"r"))==NULL)

            {

                        sprintf(stream_ptr1,"cat %s | sort -t,  -rn -k 11,11 | awk -F\",\" '{ \

        if ( \$3 ==\"%s\" ) {print \$1\",\"\$2\",\"\$4\",\"\$5\",\"\$6\",\"\$7\",\"\$10\",,,\"\$8\",\"\$9\",\"\$3} \

        }'  | head -%d > %s",szoutlr_fname,product,num_of_top_records,szout_fname);

            }

            else

            {

                        fclose(fp2);

                        sprintf(stream_ptr1,"cat %s | sort -t,  -rn -k 11,11 | awk -F\",\" '{ \

                        if ( \$3 ==\"%s\" ) { \

        print \$1\",\"\$2\",\"\$4\",\"\$5\",\"\$6\",\"\$7\",\"\$10\",,,\"\$8\",\"\$9\",\"\$3 \

    } \

    }'  | head -%d >> %s",szoutlr_fname,product,num_of_top_records,szout_fname);

           }


If i use the above code to and run the program i am getting the error as below , Broken Pipe error . see the below from the output file

Code:
Command to Sort: cat 1input_file | sort -t,  -rn -k 11,11 | awk -F"," '{           if ( $3 =="  73928711" ) {         print $1","$2","$4","$5","$6","$7","$10",,,"$8","$9","$3     }     }'  | head -100 >> /tmp21208391

Command to Sort: cat 1input_file | sort -t,  -rn -k 11,11 | awk -F"," '{           if ( $3 =="  73928712" ) {         print $1","$2","$4","$5","$6","$7","$10",,,"$8","$9","$3     }     }'  | head -100 >> /tmp21208391

Command to Sort: cat 1input_file | sort -t,  -rn -k 11,11 | awk -F"," '{           if ( $3 =="  73928713" ) {         print $1","$2","$4","$5","$6","$7","$10",,,"$8","$9","$3     }     }'  | head -100 >> /tmp21208391

awk: cmd. line:1: (FILENAME=- FNR=193) fatal: print to "standard output" failed (Broken pipe)

Command to Sort: cat 1input_file | sort -t,  -rn -k 11,11 | awk -F"," '{           if ( $3 =="  73928722" ) {         print $1","$2","$4","$5","$6","$7","$10",,,"$8","$9","$3     }     }'  | head -100 >> /tmp21208391

Please let me know why this is happening


Thanks,
Arun
 

10 More Discussions You Might Find Interesting

1. Linux

pipe broken

hi i have a server, and i have a web site and i installed apache in the /usr/local/apache/logs i have a file and i have this problem (32)Broken pipe: core_output_filter: writing data to the network plz help me how i can resolve this plz it's urgent th (2 Replies)
Discussion started by: abir2
2 Replies

2. AIX

broken pipe error

Hi, I am working on AIX 5.3 . I have client-server program which is in ProC.while sending packet to server i am getting error as broken pipe and program exiting. please help?/? (1 Reply)
Discussion started by: ajaysahoo
1 Replies

3. UNIX for Dummies Questions & Answers

echo: write error: Broken pipe ??

I want to try the unix pipe, the command is like this: echo new | find . the standard output of the echo should be "new", then I guess find command will use this output as input to find the file named "new". But the output is all the file names in my current dir, the last line is "echo: write... (5 Replies)
Discussion started by: andrewust
5 Replies

4. Shell Programming and Scripting

Replace pipe with Broken Pipe

Hi All , Is there any way to replace the pipe ( | ) with the broken pipe (0xA6) in unix (1 Reply)
Discussion started by: saj
1 Replies

5. UNIX for Advanced & Expert Users

sftp error:- Couldn't send packet: Broken pipe

Hi, I am trying to sftp a large file(appx. 2 GB size) from solaris 10 to a Linux server. While sftping(with no options), connection is terminated after some time with broken pipe error. sftp with option -R1 or -B1500 is successful. Linux server ssh Version: OpenSSH_3.9p1, OpenSSL 0.9.7a... (3 Replies)
Discussion started by: brij123
3 Replies

6. Shell Programming and Scripting

Broken Pipe error

Hello while doing sftp over server "A" , i am getting a broken pipe error i.e cat: write error: Broken pipe what does that mean? please let me know if you want any other info on this.. (3 Replies)
Discussion started by: urfrnddpk
3 Replies

7. UNIX for Dummies Questions & Answers

broken pipe error

I'm new to scripting, and this forum has been invaluable in helping me out. I'm hoping I can get some personal help now though. I have a korn script that takes a list of servers and either telnets or sshs into it (only some are set up for ssh). What I'm doing now is trying to telnet first, and... (10 Replies)
Discussion started by: aimeet
10 Replies

8. UNIX for Dummies Questions & Answers

SFTP error between UNIX to iSeries (Write Failed Broken Pipe)

Hi, I am iseries resource and having Issue in one of the sFTP failures between one of my job (Unix --> iSeries). The response to sending machine (Unix) is "Write Failed Broken Pipe". Appreciate any help Available on why this Issue happens, how can we replicate the same, what fixes can... (1 Reply)
Discussion started by: hamelchauhan
1 Replies

9. Solaris

RWSocket::send: Broken pipe Error in /var/adm/messages

Hi Guys, I am getting some strange error in /var/adm/messages in my Solaris 10 box with Veritas Cluster and EMC storage. bash-3.00$ cat /var/adm/messages | egrep -v "lw8|snmp|sshd|xntpd|kern.info|LOGIN|link|service|started|finished|repeated|SS7 Log-daemon|success" Dec 18 09:58:35 GAMMa2... (1 Reply)
Discussion started by: vivek.goel.piet
1 Replies

10. Shell Programming and Scripting

How can we overcome Broken pipe error during scp,SFTP,Rsync while transferring big files.?

Hello All, Hope all are doing well. We use scp (some times sftp and rsync also) for transferring big files (around 2GB each ) from 1 Network to another Network. The Issues which we face :- During transfer some times( Once in 1 week (or twice)) , the speed of transfer gets down to 30 kb/s,... (2 Replies)
Discussion started by: Upendra Bhushan
2 Replies
ppmtosixel(1)						      General Commands Manual						     ppmtosixel(1)

NAME
ppmtosixel - convert a portable pixmap into DEC sixel format SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC LJ250 color inkjet printer. If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file. OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com- pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni- tude larger than a compressed file and prints much slower. -margin If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci- fied, a 1.5 inch left margin will offset the image. PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?. BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation. SEE ALSO
ppm(5) AUTHOR
Copyright (C) 1991 by Rick Vinci. 26 April 1991 ppmtosixel(1)
All times are GMT -4. The time now is 04:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy