Remove all lines starting with # in a file

sponge

grep -v '^{{#}}' {{path/to/file}} | sponge {{path/to/file}}

click the source code to copy install sponge on any operating system with command-not-found.com