Saturday, April 12, 2008

Problem with zcat, zgrep, gzcat, gzgrep.

The zcat and zgrep works well in RHEL-5. However, zcat (or gzgrep and gzcat) in Sol10X86 behave differently with SIO h-files and local CMON h-files. Moreover, in RHEL-5, I failed to get information from the compressed h-files of CMON experiment. This cross-platform problem seems so complicated. I can't handle this. :(

There are problems with grep of RHEL-5. It said "Binary file (standard input) matches" when using zcat hbjgpa.05001.Z | grep "Number of stations" or zgrep "Number of stations" hbjgpa.05001.Z.

2 comments:

Kelby said...

Found this when googling for help, so thought I'd share:

zgrep -a

seems to work to solve this problem. I don't think the -a should be necessary for zgrep, but when I add it zgrep behaves as expected.

Anonymous said...

I always motivated by you, your views and way of thinking, again, appreciate for this nice post.

- Murk