Bug 25324 - lesspipe.sh does the wrong thing for *.[1-9].{gz,bz2}
lesspipe.sh does the wrong thing for *.[1-9].{gz,bz2}
Product: Red Hat Linux
Classification: Retired
Component: less (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Karsten Hopp
Aaron Brown
Depends On:
  Show dependency treegraph
Reported: 2001-01-30 14:48 EST by Bradley
Modified: 2007-04-18 12:30 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-01-31 16:57:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bradley 2001-01-30 14:48:09 EST
lesspipe.sh has some special matches to handle compressed man pages, and
checks after decompression that these are man pages. It doesn't have
backups incase it was just a normal file with a name which matched (eg less
patch-2.4.1.bz2 just displays the compressed input)

To fix, change the first two cases to be:

    if gunzip -c "$1" |file - |grep troff &>/dev/null; then
      gunzip -c "$1" |groff -s -p -t -e -Tlatin1 -mandoc - ;
      gzip -dc "$1"  2>/dev/null ;
    fi ;;
    if bunzip2 -c "$1" |file - |grep troff &>/dev/null; then
      bunzip2 -c "$1" |groff -s -p -t -e -Tlatin1 -mandoc -
      bzip2 -dc "$1"  2>/dev/null ;
    fi ;;
Comment 1 Philip Rowlands 2001-01-31 16:57:15 EST
The current lesspipe.sh in rawhide is a significant rewrite of the less-358-7
version shipped with RH7.0. However, it exhibits the same bug as reported, in
not handling non-manpage files with manpage-like names.

See bug #17456 for a fix.
Comment 2 Karsten Hopp 2001-01-31 17:46:09 EST
Thanks for this bugreport and the fix.
less-358-13 contains a fix for this

Note You need to log in before you can comment on or make changes to this bug.