OT: bash script - unexpected exit

Andre Speelmans fedora-list at cosiso.nl
Mon Jan 16 18:27:29 UTC 2012


> 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é


More information about the users mailing list