Ключевые слова:shell, less, (найти похожие документы)
_ RU.LINUX (2:5077/15.22) ___________________________________________ RU.LINUX _
From : Cyril Rotmistrovsky 2:463/59.60 19 Jun 97 10:21:16
Subj : пpавда less умеет в gz лазить?
________________________________________________________________________________
Comment tu vas, Oleg?
En 16 Jun 97 13:25:52, Oleg Machulski as ecrit a Cyril Rotmistrovsky:
CR>> ~$ less /usr/doc/HOWTO/Cyrillic-HOWTO.gz
OM> а что, пpавда less умеет в gz лазить?
Канэшна! Как нэ лазит - лазит и в .gz, и в .Z, и в .tar, и в .tar.gz, и куда
хошь! Только неглубоко.
Что-то много народа не верит. Причем, IMHO, те, кто только RedHat и щупал (в
Slackware less работал правильно out of the box, все дело в
/etc/skel/{.bash_profile,.bashrc,.profile} и /etc/bahrc/*). Hу, держитесь ;) :
~$ rpm -q less
less-321-3
~$ man less
[...]
INPUT PREPROCESSOR
You may define an "input preprocessor" for less. Before
less opens a file, it first gives your input preprocessor
a chance to modify the way the contents of the file are
displayed. An input preprocessor is simply an executable
program (or shell script), which writes the contents of
the file to a different file, called the replacement file.
The contents of the replacement file are then displayed in
place of the contents of the original file. However, it
will appear to the user as if the original file is opened;
that is, less will display the original filename as the
name of the current file.
> и даже:
[...]
For example, on many Unix systems, this script will work
like the previous example scripts:
lesspipe.sh:
#! /bin/sh
case "$1" in
*.Z) uncompress -c $1 2>/dev/null
;;
esac
To use this script, put it where it can be executed and
set LESSOPEN="|lesspipe.sh %s". When an input pipe is
used, a LESSCLOSE postprocessor can be used, but it is
usually not necessary since there is no replacement file
to clean up. In this case, the replacement file name
passed to the LESSCLOSE postprocessor is "-".
[...]
Может, кто не знает, как ls цветным сделать? И свои цвета ему настроить? ;) В
RedHatе он же не цветной по дефалту... ;).
OM> Oleg.
Bon chance,
Cyril
--- Individualists, unite! (QDed/QEcho) * Origin: Microsoft free station @ 2:463/59.6o (2:463/59.60)