Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Pipe not taken into consideration Post 302069960 by Perderabo on Thursday 30th of March 2006 12:14:26 PM
Old 03-30-2006
2 is the file descriptor for errors. Also 1 is the file descriptor for standard output and 0 is standard input.
 

9 More Discussions You Might Find Interesting

1. Programming

pipe help

i made a lot of processes. here is the code: main() { printf("\nEnter K="); scanf("%d",&k); printf("Enter L="); scanf("%d",&l); printf("\nFather id=%d\n",getpid()); x=0; makechild(); sleep(2); return 1; } int makechild() { for(q=1;q<=k;q++) { if(f=fork()) { ... (5 Replies)
Discussion started by: bb666
5 Replies

2. Shell Programming and Scripting

pipe | question

how do you pipe the results to next statement as argument? somecommand | grep $result somefile how do you reference $result with?? (12 Replies)
Discussion started by: convenientstore
12 Replies

3. Programming

Gcc with pipe

I want to compile all files in my directory i wrote find *.c | gcc -o * *.c but it dosent work :( Help pliz (12 Replies)
Discussion started by: rzili
12 Replies

4. Shell Programming and Scripting

How can I use pipe

Hi, guys: I am working on my shell using c. How can I use pipe to implement the following? ls -l 1>> | grep hellp 1<< 2>> | less 2<< (the output of ls goes to grep, and the output of grep goes to less) Thanks Please use and tags when posting code, data or logs etc. to preserve... (1 Reply)
Discussion started by: tomlee
1 Replies

5. 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

6. Shell Programming and Scripting

How to use an input pipe ?

Hi all, I would like to use properly an input pipe, like this : cat myFile.txt | myCommand.shI always find this solution : while read line; do ...; donebut I have a great lost of performance ! On a big file, with a simple grep, I can spend 2400 times more time ! oO (from 0,023sec to 1m)... (4 Replies)
Discussion started by: LeNouveau
4 Replies

7. Shell Programming and Scripting

Pipe and fgrep

Hi , Please help me resolve the below issue. I need to combine the below two command into one. grep 'ImanItemP' import.report| tr -s ' ' | cut -f2 -d ' ' > tmp.txt fgrep -v -f tmp.txt input.txt > reuired file.txt Thanks Ramesh (4 Replies)
Discussion started by: ramesh12621
4 Replies

8. Shell Programming and Scripting

Pipe Functionality

Hi, I am trying to emulate the '|' functionality through pipe function call. I am passing the o/p of exec in parent as input to the exec in child. The buf is readin the o/p but the exec in child is not working. Can somebody checkout the code and point where am i going wrong or missing something.... (3 Replies)
Discussion started by: amejoish
3 Replies

9. Shell Programming and Scripting

How to ignore Pipe in Pipe delimited file?

Hi guys, I need to know how i can ignore Pipe '|' if Pipe is coming as a column in Pipe delimited file for eg: file 1: xx|yy|"xyz|zzz"|zzz|12... using below awk command awk 'BEGIN {FS=OFS="|" } print $3 i would get xyz But i want as : xyz|zzz to consider as whole column... (13 Replies)
Discussion started by: rohit_shinez
13 Replies
multitee(1)						      General Commands Manual						       multitee(1)

NAME
multitee - send multiple inputs to multiple outputs SYNTAX
multitee [ -bsize ] [ -vQq ] [ fd-fd,fd,fd... ] ... DESCRIPTION
multitee sends multiple inputs to multiple outputs. Given an argument of the form fdin-fdout,fdout,fdout... it will send all input on file descriptor fdin to each descriptor fdout. It will exit when all fdin are closed. Several arguments may specify outputs from the same fdin. -fdout and ,fdout are equivalent. If there is an error of any sort (including SIGPIPE) in writing to fdout, multitee prints a warning on stderr and forgets fdout entirely. (This doesn't affect reads on fdin.) If -fdout is replaced by :fdout then multitee will exit upon any SIGPIPEs from that descriptor. Furthermore, efd means that as soon as fdin reaches end of file, fd is considered to reach EOF as well. multitee will warn about any input errors and then treat them like EOF. Unlike tee, multitee tries its best to continue processing all descriptors even while some of them are blocked. However, it will get stuck reading if someone else is reading the descriptor and grabs the input first; it will get stuck writing if an input packet does not fit in an output pipe. (If the output descriptor has NDELAY set, and multitee receives EWOULDBLOCK, it writes one byte at a time to avoid pipe synchronization problems.) While it is tempting to set the descriptors to non-blocking mode, this is dangerous: other processes using the same open file may not be able to deal with NDELAY. It is incredible that none of the major UNIX vendors or standards committees has come up with true per-process non-blocking I/O. (Under BSD 4.3 and its variants, multitee could send timer signals to itself rapidly to inter- rupt any blocking I/O. However, this cannot work under BSD 4.2, and is generally more trouble than it's worth.) A program can set NDELAY before invoking multitee if it knows that no other processes will use the same open file. multitee will also temporarily stop reading an input descriptor if more than 8192 bytes are pending on one of its output descriptors. This does not affect independent fdin-fdout pairs. multitee has several flags: -bsize Change input buffer size from 8192 to size. Unlike the previous version of multitee, this version does not require output buf- fers, and does not copy bytes anywhere between read() and write(). -v Verbose. -q Quiet. multitee will not use stderr in any way (except, of course, if descriptor 2 is specified in an argument). -Q Normal level of verbosity. EXIT VALUE
0 normally. 1 for usage messages. 3 if multitee runs out of memory. 4 in various impossible situations. DIAGNOSTICS
fatal: out of memory multitee has run out of memory. warning: cannot read descriptor Self-explanatory. warning: cannot write descriptor Self-explanatory. EXAMPLES
multitee 0-1,4,5 4>foo 5>bar Same as tee foo bar except for better blocking behavior. multitee 0:1 3:1 4:1,2 6:7 Merge several sources into the output, meanwhile copying 6 to 7 and recording 4's input in 2. tcpclient servermachine smtp multitee 0:7 6:1e0 Same as mconnect on Suns. The e0 tells multitee to quit as soon as the network connection closes. RESTRICTIONS
multitee expects all descriptors involved to be open. Currently a closed descriptor acts like an open descriptor which can never be writ- ten to. BUGS
None known. VERSION
multitee version 3.0, 7/22/91. AUTHOR
Placed into the public domain by Daniel J. Bernstein. SEE ALSO
tee(1) multitee(1)
All times are GMT -4. The time now is 05:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy