I tried this:
file=\"myfile\" while read -r line do [[ $line = \\#* ]] && continue \"address=\\$line\\127.0.0.1\" done < \"$file\"
This could also be accomplished with 1 sed command:
sed
file="myfile" sed -i".backup" 's/^#.*$//' $file
This will modify the file in-place (creating a backup copy first), removing all lines starting with a #.
#