OT: bash script - unexpected exit
Matthew Mosesohn
mmosesoh at redhat.com
Mon Jan 16 18:16:19 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
Matthew Mosesohn
"Мир тесен."
----- Original Message -----
From: "Hiisi" <hiisi at fedoraproject.org>
To: "Community support for Fedora users" <users at lists.fedoraproject.org>
Sent: Monday, January 16, 2012 12:08:45 PM
Subject: Re: OT: bash script - unexpected exit
Never mind. I changed it to use for line in `cat hosts` and now it works.
Sorry for the noise, list. Thanks for the tip, Kevin. That was fast!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20120116/0f3c1295/attachment.html>
More information about the users
mailing list