Документ взят из кэша поисковой машины. Адрес оригинального документа : http://comet.sai.msu.ru/UNIXhelp/tasks/display1.3.2.1.html
Дата изменения: Fri Jan 17 12:43:23 1997
Дата индексирования: Tue Oct 2 02:30:45 2012
Кодировка:

Поисковые слова: m 87 jet
Example of customising the less command

Example of customising the less command

These examples show how the environment variable LESS is set; first by users of the C and TC shells and then by users of the Bourne and BASH shells.


C shell / TC shell

To display the size of the file in the prompt:

   setenv LESS -P%B

or:

   LESS=-P;export LESS

This displays the size (in bytes) of the file being displayed.


Bourne shell / BASH

To change the prompt and the way that text is displayed:

   setenv LESS '-N -S -P%f'

or:

   LESS='-N -S -P%f';export LESS

This puts the filename in the prompt (-P%f), displays the number of each line in the file (-N) and truncates lines that are too long to be displayed on the screen so that they do not wrap onto the next line (-S).

Check the manual page for a full list of all the options that are available.


[Home] [Search] [Index]