Subject: bin/26145: "zcat -f" misbehaves
To: None <gnats-bugs@gnats.NetBSD.org>
From: Matthias Scheler <tron@zhadum.de>
List: netbsd-bugs
Date: 07/02/2004 23:56:51
>Number:         26145
>Category:       bin
>Synopsis:       "zcat -f" misbehaves
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 02 21:57:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 2.0_BETA (also in 2.0G)
>Organization:
Matthias Scheler                                  http://scheler.de/~matthias/
>Environment:
System: NetBSD colwyn.zhadum.de 2.0_BETA NetBSD 2.0_BETA (COLWYN) #1: Wed Jun 16 20:11:07 CEST 2004 tron@colwyn.zhadum.de:/src/sys/compile/COLWYN i386
Architecture: i386
Machine: i386

>Description:
"zcat -f" doesn't work on uncompressed files as it should:

tron@colwyn:~>uname -sr
NetBSD 2.0_BETA
tron@colwyn:~>zcat -f /var/log/maillog | wc -l
zcat: input not gziped
: Undefined error: 0
       0

tron@beaver:~>uname -sr
NetBSD 1.6.2_STABLE
tron@beaver:~>zcat -f /var/log/maillog | wc -l
   20123

This incompatiblity will break shell scripts which use "zcat -f" to
be able to handle compressed and uncompressed files.

>How-To-Repeat:
zcat -f /var/log/maillog

>Fix:
None provided.

>Release-Note:
>Audit-Trail:
>Unformatted: