Commands with options: (was: war story: parallel(1) command)

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Mon Jul 29 21:45:35 UTC 2013


On Sun, Jul 28, 2013 at 04:04:56PM -0400, phiscock-g851W1bGYuGnS0EtXVNi6w at public.gmane.org wrote:
> Whoops.
> 
> ls -colour works, the directories are a different colour.
> ls -colour | more does not work, the directories are the same colour.

ls --color=always | more

> ls -d is claimed in the manual entry to list directories, but it just
> lists the current directory. Has anyone actually used this feature?
> 
> Interestingly ls -d /* does list directories...and in colour. Piping that
> to 'more' removes the colour.

Normally you use --color=auto by default, which is, colour on when
sending to a tty, off when sending to a pipe (so that the escape sequences
for colour don't confuse the pipe processing the data).

-- 
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list