I have a 'for loop' in the script that inserts the lines from the '.txt' input file into the destination .html file. It also works (pretty much) great. The problem is that a <space> within a line in the input file is interpreted as a <carriage-return> and breaks the item into two items. I can VERY easily alter this 'mis-behavior' by substituting <underscore> characters for <space>s in my list and it isn't at all difficult.
Example:
pork roast
becomes
pork
roast
Question:
What basic stupidity am I committing?
I've done "man cat" an not found anything obvious to me.
Code: Select all
##############################################################################
## now add text file entries
for entry in $(cat "$inputFile")
do
echo "$entry<br>" >> "$outputFile";
done
## ??? spaces in lines are interpreted as carriage returns ???
## I have to replace spaces with inderscores? Why is that, I wonder ??
##############################################################################