Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

'tee' with pipes

by qi3ber (Scribe)
on Nov 03, 2000 at 22:45 UTC ( [id://39876]=CUFP: print w/replies, xml ) Need Help??

This simple snippet allows the power commandline user to perform multiple commands based on the unified output of a single command.

ie:
$ ps -aef | pipe.pl 'grep orien >qi3ber.log' | grep root >root.log
#!/bin/perl -w use strict; open PIPE, "|@ARGV" or die if @ARGV; if ( @ARGV ) { select PIPE; } else { select STDERR; } while (<STDIN>) { print STDOUT $_; print $_; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: CUFP [id://39876]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-26 01:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found