<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'>You shouldn't rely on cat or for to read a file line by line, but instead do this:<br><br>while read line; do<br>&nbsp; commands<br>done &lt; hosts<br><br><br><div><span name="x"></span>Matthew Mosesohn<br><br>"Мир тесен."<br><span name="x"></span><br></div><br><hr id="zwchr"><div style="color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Hiisi" &lt;hiisi@fedoraproject.org&gt;<br><b>To: </b>"Community support for Fedora users" &lt;users@lists.fedoraproject.org&gt;<br><b>Sent: </b>Monday, January 16, 2012 12:08:45 PM<br><b>Subject: </b>Re: OT: bash script - unexpected exit<br><br>Never mind. I changed it to use for line in `cat hosts` and now it works.<br>Sorry for the noise, list. Thanks for the tip, Kevin. That was fast!</div><br></div></body></html>