Re: bzgrep question.
- In reply to: doug : "bzgrep question."
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 15 Feb 2022 15:22:40 UTC
On 05/02/2022 19:04, doug wrote: > On a 12.1 system `bzgrep -f` does not work. > >> uname -a > FreeBSD freeport.safeport.com 12.1-RELEASE-p8 FreeBSD 12.1-RELEASE-p8 > GENERIC amd64 > >> bzgrep -f /tmp/ids maillog.0.bz2 > bzcat: I won't read compressed data from a terminal. > bzcat: For help, type: `bzcat --help'. > -------------- >> bzcat maillog.0.bz2 | grep -f /tmp/ids | head > Feb 4 00:14:29 freeport postfix/qmgr[47890]: C502C3B8AE8: > from=<doug@widgets.com>, size=37455, nrcpt=3 (queue active) > Feb 4 00:14:29 freeport postfix/qmgr[47890]: AAB0B1793D2: from=<>, > size=6262, nrcpt=1 (queue active) > > I know this has worked on other 12.1 systems but currently I only have > this one. > > As far as I know, ALL options to zgrep are passed unchanged to grep. Bearing this in mind you're getting exactly what I'd expect. "-f /tmp/ids maillog.0.bz2" is telling grep to get it's patterns from the file (good luck with that), and as there's no remainder of the line it's being asked to read the data to search from stdin (the terminal at this stage). Probably not what you wanted. I could be wrong about what -f does, but my understanding is that the next argument is the file to read the patterns from. Regards, Frank.