Debian Bug report logs - #216211
gzip: zgrep chokes on filenames with a pipe '|' character in them

version graph

Package: gzip; Maintainer for gzip is Milan Kupcevic <milan@debian.org>; Source for gzip is src:gzip (PTS, buildd, popcon).

Reported by: kuno@frob.nl

Date: Fri, 17 Oct 2003 10:33:01 UTC

Severity: normal

Tags: patch

Found in version 1.3.5-7

Fixed in version gzip/1.3.5-9

Done: Bdale Garbee <bdale@gag.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Bdale Garbee <bdale@gag.com>:
Bug#216211; Package gzip. (full text, mbox, link).


Acknowledgement sent to kuno@frob.nl:
New Bug report received and forwarded. Copy sent to Bdale Garbee <bdale@gag.com>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Kuno Woudt <kuno@frob.nl>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: gzip: zgrep chokes on filenames with a pipe '|' character in them
Date: Fri, 17 Oct 2003 12:20:37 +0200
Package: gzip
Version: 1.3.5-7
Severity: normal

zgrep doesn't find the search pattern in files which have a pipe '|'
character in their filename, here's an example:

warp@ararita:/tmp>echo foo > bar.txt          
warp@ararita:/tmp>echo foo > look\|a\|pipe.txt
warp@ararita:/tmp>zgrep foo *txt
bar.txt:foo
sed: -e expression #1, char 10: Unknown option to 's'

if someone could have a look at that, that would be great, thanks!

-- Kuno.


-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux ararita 2.4.20 #1 ma jun 9 04:18:50 CEST 2003 i686
Locale: LANG=nl_NL, LC_CTYPE=nl_NL

Versions of packages gzip depends on:
ii  debianutils                   1.16.3     Miscellaneous utilities specific t
ii  libc6                         2.3.2-7    GNU C Library: Shared libraries an




Information forwarded to debian-bugs-dist@lists.debian.org, Bdale Garbee <bdale@gag.com>:
Bug#216211; Package gzip. (full text, mbox, link).


Acknowledgement sent to Javier Fernández-Sanguino Peña <jfs@computer.org>:
Extra info received and forwarded to list. Copy sent to Bdale Garbee <bdale@gag.com>. (full text, mbox, link).


Message #10 received at 216211@bugs.debian.org (full text, mbox, reply):

From: Javier Fernández-Sanguino Peña <jfs@computer.org>
To: 216211@bugs.debian.org, control@bugs.debian.org
Subject: Fix for this bug
Date: Thu, 1 Jul 2004 23:59:09 +0200
[Message part 1 (text/plain, inline)]
tags 216211 patch
thanks

The patch below looks like a correct patch to me:

$ echo foo > bar.txt
$ echo foo > look\|a\|pipe.txt
$ ./zgrep foo *.txt
bar.txt:foo
look|a|pipe.txt:foo


--- zgrep.orig  2004-07-01 23:55:50.000000000 +0200
+++ zgrep       2004-07-01 23:55:38.000000000 +0200
@@ -100,6 +100,7 @@
     elif test $with_filename -eq 0 && { test $# -eq 1 || test $no_filename 
-eq
1; }; then
       $grep $opt "$pat"
     else
+      i=`echo $i | sed -e 's/|/\\\\|/g'`
       if test $with_filename -eq 1; then
        sed_script="s|^[^:]*:|${i}:|"
       else
[signature.asc (application/pgp-signature, inline)]

Tags added: patch Request was from Javier Fernández-Sanguino Peña <jfs@computer.org> to control@bugs.debian.org. (full text, mbox, link).


Tags added: pending Request was from bdale@gag.com (Bdale Garbee) to control@bugs.debian.org. (full text, mbox, link).


Reply sent to Bdale Garbee <bdale@gag.com>:
You have taken responsibility. (full text, mbox, link).


Notification sent to kuno@frob.nl:
Bug acknowledged by developer. (full text, mbox, link).


Message #19 received at 216211-close@bugs.debian.org (full text, mbox, reply):

From: Bdale Garbee <bdale@gag.com>
To: 216211-close@bugs.debian.org
Subject: Bug#216211: fixed in gzip 1.3.5-9
Date: Sat, 24 Jul 2004 03:47:04 -0400
Source: gzip
Source-Version: 1.3.5-9

We believe that the bug you reported is fixed in the latest version of
gzip, which is due to be installed in the Debian FTP archive:

gzip_1.3.5-9.diff.gz
  to pool/main/g/gzip/gzip_1.3.5-9.diff.gz
gzip_1.3.5-9.dsc
  to pool/main/g/gzip/gzip_1.3.5-9.dsc
gzip_1.3.5-9_i386.deb
  to pool/main/g/gzip/gzip_1.3.5-9_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 216211@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bdale Garbee <bdale@gag.com> (supplier of updated gzip package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat, 24 Jul 2004 01:23:03 -0600
Source: gzip
Binary: gzip
Architecture: source i386
Version: 1.3.5-9
Distribution: unstable
Urgency: low
Maintainer: Bdale Garbee <bdale@gag.com>
Changed-By: Bdale Garbee <bdale@gag.com>
Description: 
 gzip       - The GNU compression utility
Closes: 216211 217925 234212 248722 250766 257314 259043 259284
Changes: 
 gzip (1.3.5-9) unstable; urgency=low
 .
   * eliminate the autoconf and automake build dependencies, since they are
     no longer needed, closes: #250766
   * improve temp file usage in gzexe, closes: #257314, #259043
   * have zmore use 'more' instead of honoring $PAGER, to avoid violating
     the principle of least astonishment, closes: #234212
   * fix zgrep choke on filenames including a pipe character, closes: #216211
   * incorporate watch file, closes: #248722
   * suggest less, since we provide zless, closes: #217925
   * use signames instead of signumbers for trap calls, closes: #259284
Files: 
 d054334da25c598a01dc67caeaa69534 552 base required gzip_1.3.5-9.dsc
 255c5fd4e5c240dac8c0fb8a919e22d4 55132 base required gzip_1.3.5-9.diff.gz
 8e17af6f0a98ece32202c8c3962a7be8 70632 base required gzip_1.3.5-9_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBAhA+ZKfAp/LPAagRAp+sAJ4ktDTmVmTZJ91MvAtp7aM8WmunwwCfbL34
gG4gQyIR0vRvIyhFuGy5amk=
=4+AD
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Aug 13 22:51:57 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.