in reply to Out of Memory
The trick to zgrep is that it really isn't very portable. For example, the -d option isn't supported by my system's grep. Here's what I used that worked:
You'll notice that I used "|-": it writes to STDOUT, which is what I think that you were trying to do. I also tried it with "-|": it writes to STDIN, and that didn't work.#!/usr/bin/perl use strict; use warnings; my $file = shift @ARGV; open(INFILE, "|-", "zgrep -c -e / $file ") or die $!; close INFILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Out of Memory
by NetWallah (Canon) on Jun 04, 2011 at 19:34 UTC |