Hi,
Every once in a while I come across a situation which could be overcome by
adding a few lines of code to ~/.bashrc... The problem is that this causes to
"less" to appear hosed in LM7.2. This does not happen if I put the same code
into LM8.0's .bashrc-private.
While this is not a problem in 8.0, I hate situations where the answer is so
elusive; my fear is that it'll come back to bite at a very inopportune time...
Added this to .bashrc:
for host in `cat ~/.xhosts.allowed`
do
/usr/X11R6/bin/xhost +$host
done
Then, when I try to "less ...", this code gets executed rather than displaying
the file; like this:
$ less /usr/bin/lesspipe.sh
localhost being added to access control list
bones being added to access control list
woody being added to access control list
beagles being added to access control list
/usr/bin/lesspipe.sh lines 1-4/4 (END)
Removing the above code gives:
$ less /usr/bin/lesspipe.sh
#!/bin/sh
TYPE=`file -L $1 | cut -d' ' -f2-`
case $TYPE in
gzip*) CMD='gzip -d -c -q';;
compress\'d\ data*) CMD='uncompress -c';;
GNU\ tar*) CMD='tar -tvf';;
Zip*) CMD='unzip -c -qq';;
Zoo*) CMD='zoo xqp';;
ARC*) CMD='arc pn';;
LHa*) CMD='lha p';;
RAR*) CMD='unrar p';;
RPM*) CMD='rpm -qpil';;
# ARJ*) unset CMD;;
ELF*) CMD='strings';;
Linux/i386*) CMD='strings';;
MS-DOS\ executable*) CMD='strings';;
MS-Windows*) CMD='strings';;
Win95\ executable*) CMD='strings';;
bzip2\ compressed*) CMD='bunzip2 -d -c';;
bzip\ compressed*) CMD='bunzip -d -c';;
*) unset CMD;;
esac
if [ -z "$CMD" ]; then
case $1 in
*.bz) CMD='bunzip -d -c';;
*.bz2) CMD='bunzip2 -d -c';;
esac
fi
if [ -n "$CMD" ]; then
$CMD $1 2> /dev/null
fi
/usr/bin/lesspipe.sh lines 1-36/36 (END)
Any idea what gives...?
Pierre