Re: Pipe through LESS and MORE
[email protected] (Bob Proulx) Sat, 20 Mar 2004 18:26:27 -0700
| Newsgroups | gmane.comp.gnu.fileutils.bugs |
|---|---|
| Message-ID | <[email protected]> |
David Hergert wrote:
> When I pipe the output of ls through less or more, the escape
> characters show. Looks really bad.
This really falls into the category of the old joke, "The patient says
to the doctor, it really hurts when I do this ... The doctor resonds
by saying, then don't do that and you will be fine."
> OS X 10.3
> Terminal using tcsh
> command : ls --color -f -L | less
>
> Dont know if you know of this already.
Perhaps you wanted --color=auto instead? Here is the online
documentation.
info ls
`--color [=WHEN]'
Specify whether to use color for distinguishing file types. WHEN
may be omitted, or one of:
* none - Do not use color at all. This is the default.
* auto - Only use color if standard output is a terminal.
* always - Always use color.
Specifying `--color' and no WHEN is equivalent to `--color=always'.
Piping a colorized listing through a pager like `more' or `less'
usually produces unreadable results. However, using `more -f'
does seem to work.
Hope that helps,
Bob