i am writing this code:
awk -F\'=\' \'!/^$/{arr[$1]=$2}END{for (x in arr) {print x\"=\"arr[x]}}\' 1.txt 2.txt
this code ignore blank lines,
Change !/^$/ to
!/^$/
!/^($|#)/
or
!/^($|[:space:]*#)/
if you want to disregard whitespace before the #.
#