Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: dynamic zcat and grep

by jasonk (Parson)
on Mar 22, 2006 at 00:39 UTC ( #538365=note: print w/replies, xml ) Need Help??


in reply to Re^2: dynamic zcat and grep
in thread dynamic zcat and grep

Since you are on a Red Hat machine anyway, you can save yourself a lot of time just by using 'zgrep'.


We're not surrounded, we're in a target-rich environment!

Replies are listed 'Best First'.
Re^4: dynamic zcat and grep
by clmcshque (Initiate) on Mar 22, 2006 at 20:30 UTC
    Thanks for the reply. zgrep works great on the command line, but how do I get it to work within my script? Could I do the following: (I would try it but don't have access to the system right now)
    $grep = /something/; $gzfile = file.gz; open OUTPUT "zgrep $grep $gzfile |";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://538365]
help
Chatterbox?
[huck]: erix some things also write to the raw console/tty/pty rather than stdout/stderr
[Discipulus]: see this useful site
[erix]: hm. ok. Either might be the case here. I guess I need to try out more
[choroba]: The redirections seem to happen right to left
[choroba]: but gurus say they in fact happen left to right, but we understand them wrongly
[marioroy]: bad gurus :)
[choroba]: also, &> redirects both at the same time
[marioroy]: erix are you using csh

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2017-03-23 08:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (284 votes). Check out past polls.