On Mon, 1 Jul 2002, Linux Rockz wrote:

> I have been using output redirection for quite sometime. I have often
> wondered why it is that when I use the 'ls' command, the output is in
> several columns on the monitor while it is in a single column when I
> redirect the output to a file.

ls checks the value of isatty(stdout).  If it is true, it prints
multicolumn output.  If false, it prints single column output like in ls
-1

it is single column for anything other than a terminal.

-- 
Don't abandon hope: your Tom Mix decoder ring arrives tomorrow.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to