:: Re: [DNG] Viewing file content (was…
Page principale
Supprimer ce message
Répondre à ce message
Auteur: Olaf Meeuwissen
Date:  
À: wirelessduck
CC: dng
Sujet: Re: [DNG] Viewing file content (was Re: system administration of non-systemd distros and releases)
Hi,

wirelessduck--- via Dng writes:

>> On 26 Nov 2021, at 20:40, Olaf Meeuwissen via Dng <dng@???> wrote:
>>
>> # On my own machines `lv` makes a fine `pager` for me. On the fly
>> # decompression and handling of many different encodings. So for me,
>> # it's just
>> #
>> # pager /var/log/syslog.2.gz
>> #
>> # without any `zmore` or `zcat` piping. There is still no zpager :-/
>> # but with `lv` I don't really need one.
>
> Does lv provide anything extra or different to enabling lesspipe.sh in bashrc?


The main reason for me to use lv was a need to view text files encoded
in one of Shift-JIS, EUC-JP or UTF-8. With lv, most of the time it
guesses the encoding right and if not you can loop through a bunch of
supported encodings with `t`.

# I've also had to deal with files with mixed encodings :-0, part
# Shift-JIS, part ISO-8859-* and sometimes even a bit in one of the
# Chinese encodings. Being able to toggle encoding for the current
# "page" on the fly makes it at least possible to see what's in the
# file.

Looking at the lesspipe manual page[1] (don't have less installed ;-),
it seems that it doesn't support on-the-fly encoding switching but as
far as dealing with compressed files, I guess there is no or not much
difference.

[1]: https://manpages.debian.org/bullseye/less/lesspipe.1.en.html

Hope this helps,
--
Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
 Support Free Software                        https://my.fsf.org/donate
 Join the Free Software Foundation              https://my.fsf.org/join