Anders Johansson wrote:
On Saturday 01 November 2008 04:51:43 David C. Rankin wrote:
If there is no blank line at the end of the file, the while loop reads the "oss-src" line, but does not read the "lastline". If there is a blank line at the end, it reads "lastline" just fine. What is the trick to be able to read the last line of the repos file regardless of whether there is a blank at the end or not?
Works just fine here on 11.0, with or without {}
Anders
Anders I removed the curly braces and I'm still not getting the last line. the full snipped and text file are: while read alias url; do echo -e "${alias}\t${url}" done < ~/linux/scripts/config/repos echo -e "\n\t${red}Done!${nc}\n" exit 0 The text file is: http://www.3111skyline.com/download/error/repos If you run that code on that file you will not get the "lastline" information printed without modifying the script somehow. A hexdump of the file is at: http://www.3111skyline.com/download/error/repos_hex If you are running that code on those text files and you are getting the echo of "lastline", then I want to see your code... ;-) -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org