[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Need some shell scripting help

On Fri, Dec 14, 2001 at 07:52:30PM -0600, Chad C. Walstrom wrote:
> Why the --color=none?  You do know that ls(1) does not honor the UNIX
> programming philosophy of presenting the same output regardless of the
> classification of the target file descriptor, right?

It only behaves like that if you ask it to, of course, using
--color=auto. If you don't like it, don't use that option. man behaves
similarly; if stdout is a tty it'll use a pager, whereas that would
obviously make no sense for non-ttys.

In scripts, I prefer to use 'command ls' rather than trying to cancel
the effects of whatever random shell aliases might be in use. That will
also work if ls isn't the GNU implementation.

Colin Watson                                  [cjwatson@flatline.org.uk]

Reply to: