Bug 10397 - echo command in .bashrc loads in new less command.
echo command in .bashrc loads in new less command.
Status: CLOSED DUPLICATE of bug 9443
Product: Red Hat Linux
Classification: Retired
Component: less (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-03-28 14:10 EST by joe_mccarthy
Modified: 2008-05-01 11:37 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-03-30 08:39:14 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description joe_mccarthy 2000-03-28 14:10:35 EST
After the 6.2 upgrade I found that less did not work. It seems that a
command I had in my local .bashrc file was interfering with the less
command. In my .bashrc file I had a echo command that would display a
message on start up. ex: echo 'Having fun yet?'  When I tried to less a
file, I would only get the echoed line. I rem'ed it out of my .bashrc
file and now less command works normally. The other workaround was to type
ls | less  and pipe it through less. This worked as well.

When I type env, there is a line at the top stating:
LESSOPEN=|/usr/bin/lesspipe.sh %s

 and the contains of the script in /usr/bin is:
 -------------------------------------------------------------------
> #!/bin/sh
> #
> # To use this filter with less, define LESSOPEN:
> # export LESSOPEN="|/usr/local/bin/lesspipe.sh %s"
>
> lesspipe() {
>   case "$1" in
>   *.tar) tar tvvf $1 2>/dev/null ;; # View contents of .tar and .tgz
> files
>   *.tgz) tar tzvvf $1 2>/dev/null ;;
>   *.tar.gz) tar tzvvf $1 2>/dev/null ;;
>   *.tar.bz2) bzip2 -dc $1 | tar tvvf - 2>/dev/null ;;
>   *.tar.Z) tar tzvvf $1 2>/dev/null ;;
>   *.tar.z) tar tzvvf $1 2>/dev/null ;;
>   *.Z) gzip -dc $1  2>/dev/null ;; # View compressed files correctly
>   *.z) gzip -dc $1  2>/dev/null ;;
>   *.gz) gzip -dc $1  2>/dev/null ;;
>   *.bz2) bzip2 -dc $1  2>/dev/null ;;
>   *.zip) unzip -l $1 2>/dev/null ;;
>   *.rpm) rpm -qpivl $1 2>/dev/null ;; # view contents of .rpm files
>   *.1|*.2|*.3|*.4|*.5|*.6|*.7|*.8|*.9|*.n|*.man) FILE=`file -L $1` ; #
> groff src    FILE=`echo $FILE | cut -d ' ' -f 2`
>     if [ "$FILE" = "troff" ]; then
>       groff -s -p -t -e -Tascii -mandoc $1
>     fi ;;
>   esac
> }
>
> lesspipe $1
Comment 1 Luca Bonomi 2000-03-30 08:39:59 EST
I am using tcsh, with an echo command in my .cshrc.
Less is broken in the same way.
It seems to me this bug and bug #9443 are about the same problem.
Comment 2 Bernhard Rosenkraenzer 2000-07-26 14:42:23 EDT

*** This bug has been marked as a duplicate of 9443 ***

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