|
From: | James Youngman |
Subject: | Re: Why the is output of ls direct to screen and rediect to file different? |
Date: | Sat, 7 Apr 2007 11:43:55 +0100 |
On 4/7/07, Tomthon <address@hidden> wrote:
I have use '>' redirect the output of ls to a file,and then cat the file to screen,but the record is comparted by carriage return,not the same as ls directly to sreen?What's the reason?
I will answer your question with a question, if I may. How many columns are available in an as-yet-empty output file? There's no obvious answer. Therefore there is no obvious width at which the output should wrap. Also, data sent to a file is frequently read by another program for further processing. If that is happening, one filename per line is probably a convenient choice. James.
[Prev in Thread] | Current Thread | [Next in Thread] |