Good question. No it would not add an empty line. An empty line would mean 2 consecutive linefeed characters. Or do you mean add a linefeed character if it isn't there? If a file does not have a linefeed at the last line then it isn't terminated and that line would then not be read by the read statement.
Hi, another question.
Is there any posibility that this error only happens in some versions of the operation system?
I received that script from a friend of mine, and he said that there were no such error in his computer. I am using Ubuntu 10, and he is using Ubuntu 9.
No not really. What could have happened is that his input files simply did not have asterisks in them. It could also be that he set globbing to off (i.e. no asterisk expansion) in his shell (not very likely) It could also be that he always executed the script from an empty directory, in which case the asterisk would also not get expanded. To illustrate: