OT: bash script - unexpected exit

JD jd1008 at gmail.com
Mon Jan 16 19:55:11 UTC 2012


On Mon, Jan 16, 2012 at 11:27 AM, Andre Speelmans <fedora-list at cosiso.nl> wrote:
>> You shouldn't rely on cat or for to read a file line by line, but instead do
>> this:
>>
>> while read line; do
>>   commands
>> done < hosts
>
> I would pick this form myself, but why should one not rely on cat? It
> seems to me a viable (even if useless use of cat) option.
> Is there something totally wrong with relying on cat to read a file?
>
> --
> Regards,
>
> André
> --

Andre',
Sorry I have not followed this thread.
What exactly were you trying to accomplish using cat?


More information about the users mailing list