I’m parsing some .html files in Bash. I read the input with:
while read line
do
echo $line
...do something...
done < $file
Now I’ve expierenced something real strange. Some lines in the files contain something like
Resolution…: 720 * 576
But bash gives me this:
Resolution…: 720 mysript.sh another_script.pl 576
Bash expands the * char to the content of the actual directory. How can I read the text line by line without expanding.
the expanding happens in
echo, not inread, you should quote your output: