LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Search in "less" echos all characters (https://www.linuxquestions.org/questions/linux-general-1/search-in-less-echos-all-characters-4175608897/)

FoxtrotLima 06-30-2017 06:43 AM

Search in "less" echos all characters
 
Using Linux with no special .less or .lesskey files. I'm an old unix and Solaris guy, but new to Linux.

So, while in less, when I "/" to search in a file all characters double to the reg exp.

If I want to search for "nonsense" it looks like:
/nnoonnsseennssee

I tried changing terminal type a few times (using xterm, tried vt100, and some others).

This doesn't happen when doing a search in vi, or any other place I have foud, just when using less. I just checked using "more" and there it is normal behaviour.

Have searched but find nothing and no options for this.
Any suggestions?

thanks!

Habitual 06-30-2017 07:17 AM

Welcome to LQ!

Quote:

Originally Posted by FoxtrotLima (Post 5729108)
Any suggestions?

in terminal, issue
Code:

type less
and see if it's been manipulated. Mine here is
Code:

less is /usr/bin/less
Next step. Let's see if it's in your ~/.bashrc, so in terminal, issue
Code:

bash --norc
and check the operation again, in the same terminal sesssion as "--norc"
If that corrects it, we then have to look at ~./bashrc and/or ~/.profile

If the shell isn't bash, then IDK, and hang out some more. :)

I used to manipulate the colorization of "less" using
Code:

export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;37m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
export LESS='FiX'

but I have since rem'd those out.

Good Luck!


All times are GMT -5. The time now is 04:14 AM.