|
From: | Steven W. Orr |
Subject: | Re: bizarre trap behavior while reading a file |
Date: | Tue, 29 Mar 2011 08:02:17 -0400 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 |
On 3/29/2011 2:33 AM, Mart Frauenlob wrote:
On 28.03.2011 18:03, tytus64 wrote:[...]trap "" HUP; cat $log_file | { while read line[...] useless use of cat! while read ... < file no need for a subshell actually (introducted by the pipe).
I'm a big opponent of useless cats, but I have one question: Is there a difference between while read line < file do stuff done vs while read line do stuff done < file Or does this fall into the category of style? Thanks. -- Time flies like the wind. Fruit flies like a banana. Stranger things have .0. happened but none stranger than this. Does your driver's license say Organ ..0 Donor?Black holes are where God divided by zero. Listen to me! We are all- 000 individuals! What if this weren't a hypothetical question? steveo at syslang.net
[Prev in Thread] | Current Thread | [Next in Thread] |