Re: PROBLEM: ls --color outputs undesirable leader and trailer
[email protected] (Bob Proulx) Tue, 29 Apr 2003 10:58:19 -0600
| Newsgroups | gmane.comp.gnu.fileutils.bugs |
|---|---|
| Message-ID | <[email protected]> |
gregory mott wrote: > ls --version: ls (fileutils) 4.1 (redhat7.3+up2date) > sort --version: sort (textutils) 2.0.21 (redhat7.3+up2date) > > problem: ls --color's output is almost compatible with sort, but is > wanting of a minor modification. Is 'ls --color' something you are doing or something Redhat is doing? I recommend that if you want color that you try using the auto option instead of always. Try 'ls --color=auto' instead. That turns off the escape sequences when the output is a pipe. Not specifying auto is the same as saying --color=always. Since 'ls' is already sorting the output I assume your sort example was just a simple way to illustrate a more general problem of handling the escape sequences, right? Wondering if you are having trouble with 'locale' sorting because LANG is set. But that would affect sort as well so probably not. Bob