On Tue, Nov 11, 2008 at 2:28 PM, Bryan Sant <[EMAIL PROTECTED]> wrote: > So I'm too lazy to look through the cat code, but I'm guessing that > cat is explicitly striping ANSI codes (??). Or is the shell (or > something else) doing something magical? You don't get any color/ANSI > codes if you do "ls > foo" either. I don't fully understand why.
It depends on the program, the shell that the program is run in, and any options passed through. Try these three commands, from a regular bash shell with $TERM set to xterm: ls | less ls --color=yes | less ls --color=yes | less -r Interesting, isn't it? -- Joseph http://blog.josephhall.com/ /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
