I'm doing the following, which basically works. The script tries to insert some lines into a file to rewrite it.
But it is stripping all blank lines and also all line padding. The main problem is that it does not process the last line of the file. I'm not sure why.
while read line; do
<... process some things ...>
echo ${line}>> "${ACTION_PATH_IN}.work"
done < "${ACTION_PATH_IN}"
What can be done to fix this?