Txs, it works perfectly. Quick question:
If I understand correctly, with
you are throwing the error output to the trash, correct? But what is the "2" about? could not find it in the manual.
Cheers,
panchopp.
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)
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)
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)
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)
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)
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
LEARN ABOUT DEBIAN
poe::pipe::oneway
POE::Pipe::OneWay(3pm) User Contributed Perl Documentation POE::Pipe::OneWay(3pm)NAME
POE::Pipe::OneWay - a portable API for one-way pipes
SYNOPSIS
my ($read, $write) = POE::Pipe::OneWay->new();
die "couldn't create a pipe: $!" unless defined $read;
DESCRIPTION
The right way to create an anonymous pipe varies from one operating system to the next. Some operating systems support "pipe()". Others
require "socketpair()". And a few operating systems support neither, so a plain old socket must be created.
POE::Pipe::OneWay will attempt to create a unidirectional pipe using "pipe()", "socketpair()", and IO::Socket::INET, in that order.
Exceptions are hardcoded for operating systems with broken or nonstandard behaviors.
The upshot of all this is that an application can portably create a one-way pipe by instantiating POE::Pipe::OneWay. The work of deciding
how to create the pipe and opening the handles will be taken care of internally.
POE::Pipe::OneWay may be used outside of POE, as it doesn't use POE internally.
PUBLIC METHODS
new [TYPE]
Create a new one-way pipe, optionally constraining it to a particular TYPE of pipe. One-way pipes have two ends: a "read" end and a
"write" end. On success, new() returns two handles: one for the "read" end and one for the "write" end. Returns nothing on failure, and
sets $! to explain why the constructor failed.
my ($read, $write) = POE::Pipe::OneWay->new();
die $! unless defined $read;
TYPE may be one of "pipe", "socketpair", or "inet". When set, POE::Pipe::OneWay will constrain its search to either "pipe()", a UNIX-
domain "socketpair()", or plain old sockets, respectively. Otherwise new() will try each method in order, or a particular method
predetermined to be the best one for the current operating environment.
BUGS
POE::Pipe::OneWay may block up to one second on some systems if failure occurs while trying to create "inet" sockets.
SEE ALSO
POE::Pipe, POE::Pipe::TwoWay.
AUTHOR & COPYRIGHT
POE::Pipe::OneWay is copyright 2000-2008 by Rocco Caputo. All rights reserved. POE::Pipe::OneWay is free software; you may redistribute
it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-05-15 POE::Pipe::OneWay(3pm)