Simple While read causing issues

Hi,

I have a simple while loop (ksh scripting).

while read ln1
do
   echo $ln1
done < $LogDir/$LogFile

the echo statement is displaying log file contents + also the files in $LogDir. I am not sure how it is displaying the files under $LogDir. There is no ls command either in $LogFile

Check whether you have asterisk in your input file

Run these echo commands and see the results

echo *
echo "*"

Add quotes around ln1 to avoid filenames

while read ln1
do
   echo "$ln1"
done < $LogDir/$LogFile

and:

done < "$LogDir/$LogFile"

yeah it has asterix in the log file.

Great.. I didn't even know about "echo *"

Let me try it out