how to remove comment lines (as # bal bla ) and empty lines (lines without charecters) from file with one sed command?
THX lidia
First example(paxdiablo) is very good except its not change file, just output result. If you want to change it inline:
sudo sed -i 's/#.*$//;/^$/d' inputFile