Could anyone tell me whats wrong whit this piping? the commands that they execute are correct. the command I am trying is ls|wc. Both processes go to the right if statement.
I have encountered a strange problem dealing with pipes
and forking. The program basicaly does this:
cat file | tbl | eqn | groff
Now, I have a parent process that forks children
that that exec the stuff that they should. The pipes defined
in the parent are the ones used.
The chain goes... (1 Reply)
I use read often in scripts to filter the right part into a variable like:
$ print "abc cde efg" | read k l ; print "k=$k, l=$l"
k=, l=
This works on linux and unix versions I work with. On OSX 10.4 this
doesn't work. I found a workaround but would like to know
why the original line... (5 Replies)
Basically I am trying to write a short script to report total space used on /u0? file systems. This is what I was trying to do:df -k /u0? | grep -v kbytes | awk '{ printf $2 "+" }' | sed s/.$// | bcBut it returns no output.
This works however: > A=`df -k /u0? |grep -v kbytes | awk '{ printf $2... (2 Replies)
Is there a way to know whether is pipe is opened in read or write mode.I mean is there any signal that is generated when a pipe is opened in read or write mode.
If you have some solution .please let me know ........ (2 Replies)
Hello everyone
I got a school project that was due yesterday so i really would aprreciate some help
the following is an example of the input file (bateriaTestes)
1 caeiro 2000 d
2 pessoa 100 w
3 campos 200 b
4 soares 500 w
simple 4 field lines. lines separated by \n and fields by... (1 Reply)
Hi,
Can any one please help me with this. Am struggling hard to get a solution.
I am doing telnet through a C program and getting the stdout file descriptor of the remote machine to pipe.
read() function is getting data, But whenl it receives SOH character ie. ^A ( Start of heading = Console... (2 Replies)
Hello !
I want to process a text file in order to extract desired data using sed and grep... Now I am facing a problem piping to grep... nothing happens..
The text consists of blocks of 3 lines that may (or not) contain the Desired data.
the desired data is on each 2... (4 Replies)
hi i am having issues with extra pipe.
i have a data file and i need to remove the extra pipe in the(example 4th and 7thline) in datafile. there are many other line and filed like this which i need to remove from files. The sample data is below:
270 31|455004|24/03/2010|0001235|72
271... (3 Replies)
Hi all,
Im trying to do a simple program which ask the user for a unix command with the arguments. The program fork and the two process communicate with pipes. The child process call execvp with the command and the father process read the result of the execvp via the pipe.
This program works... (11 Replies)
Hi,guys:
I want to use c to implement a pipe. For example:
ps auxwww | grep fred | more
I forked three child processes. Each is responsible for each command, and pipe to next one.
for(i=0;i<2;i++)
pipe(fd)
if(child==1) // child 1
{
close(1)
dup2(fd,1)
close(fd)
}... (3 Replies)
Discussion started by: tomlee
3 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)