Over a million developers have joined DZone.

Remove Comments From A File

·
Remove all comment lines from a file.


sed -e '/^#/d' $1 | more

or to output it to a new file

sed -e '/^#/d' $1 > $1.nocomments
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}