On Mon, Mar 11, 2002 at 11:32:39PM +0530, Raju Mathur wrote: > >>>>> "Bish" == USM Bish <[EMAIL PROTECTED]> writes: > > Bish> [snip] > Bish> 2. Once you pipe the output through more or less, colors > Bish> would be lost, and multi-column outputs would not be > Bish> there. The ANSI color codes would be stripped by the > Bish> pager. If you do "ls -alf --color=yes > somefile" and you do > Bish> a cat of "somefile" you will see it in single column. View > Bish> the same file through a pager and even colours will go. > > ls -l | less -r will retain the colours. >
Not sure if this will work for direct ls piped through less. Just tried it on my box with less (ver 354), and it could'nt give colour output. However, it works as a two stage process $ls -alf --color=yes > somefile $less -r somefile My reading of the situation is that the ANSI codes should pre-exist in the input for the -r (repaint screen) to work. Don't know if version of less has something to do with it. Maybe, time to upgrade .... Bish -- : ####[ Linux One Stanza Tip (LOST) ]########################### Sub : Erasing at the command prompt LOST #198 To erase a line you've written at the command prompt, use: "Ctrl u" ####<[EMAIL PROTECTED]>######################################## : _______________________________________________ linux-india-help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/linux-india-help
