I tried this:
file=\"myfile\" while read -r line do [[ $line = \\#* ]] && continue \"address=\\$line\\127.0.0.1\" done < \"$file\"
Comment lines can and often do begin with whitespace. Here's a bash native regex solution that handles any preceeding whitespace;
while read line; do [[ "$line" =~ ^[[:space:]]*# ]] && continue ...work with valid line... done