coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (OFFTOPIC) read ODF files using less


From: Bob Proulx
Subject: Re: (OFFTOPIC) read ODF files using less
Date: Wed, 17 Apr 2013 13:44:13 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Bernhard Voelker wrote:
> Dear e-letter,
> 
> e-letter wrote:
> > Readers,
> > 
> > Apologies if irrelevant, but curious to investigate why 'less'
> > installed on a mandriva box is able to open an opendocumentformat
> > file, but less on a opensuse box complains that such file is binary?
> > 
> > Any ideas how to investigate further?
> 
> less and therefore this question is not related to GNU coreutils,
> but this is the mailing list of GNU coreutils.

Yes.  But thankfully it wasn't submitted as a bug ticket to the
bug-coreutils!  So I will reward the submitter with an answer even
though it is off topic.  In the future though please choose the
appropriate forum.

> My personal guess is that one of the 2 distributions has added
> some patches on top of the upstream less version which makes the
> difference (if you refer to the same version at all ...).

Most distros set up an "INPUT PREPROCESSOR" for less using LESSOPEN.
See the less man page "INPUT PREPROCESSOR" section.  Look in the
environment for LESSOPEN settings.

On Debian:
  $ env | grep LESS
  LESSOPEN=| /usr/bin/lesspipe %s
  LESSCLOSE=/usr/bin/lesspipe %s %s

On Fedora:
  $ env | grep LESS
  LESSOPEN=|/usr/bin/lesspipe.sh %s

See those scripts for how they process files.  The differences are
there.  One script is programmed to handle the file and the other one
on the other system is not.

  less /usr/bin/lesspipe.sh

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]