Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a small issue with less command (this is happening only on Red Hat). Any time I use it is executing the .tcshrc. There is no alias defined for less. I have one machine running Red Hat and one SUSE, in SUSE everything is fine but not in Red Hat.

# which less

# less abc
Executing .tcshrc

Late edit based on crw comments: env variable is set as: LESSOPEN=|/usr/bin/ %s and running less -L abc is working without problem,.

share|improve this question

migrated from Oct 15 '12 at 14:02

This question came from our site for professional and enthusiast programmers.

look into /usr/bin/less and check whether it is a binary or script. I guess your less is an script. – ahmad Oct 15 '12 at 12:05
nope, is not a shell is a binary file. – alinoz Oct 15 '12 at 12:08
What behaviour do you get from running /usr/bin/less abc ? – crw Oct 15 '12 at 12:23
Thanks. Secondly, is the LESSOPEN env variable defined? -or- What happens when running less -L abc ? – crw Oct 15 '12 at 13:09
@crw please put your comment as answer, the problem is generated by LESSOPEN environment variable. – alinoz Oct 15 '12 at 13:20
up vote 1 down vote accepted

Is the LESSOPEN env variable defined?
LESSOPEN contains the path or piped-command and a filename placeholder for utilising an "input preprocessor" (filter) before displaying a file in less.

What happens when running less -L abc ?
The -L and --no-lessopen switches disable the input preprocessor.

share|improve this answer
the problem was generated by the LESSOPEN, it was set by default to a shell script and that one was lunching a shell. – alinoz Oct 15 '12 at 17:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .