This can be done with a sed one-liner:
sed '/^#/d'
This says, “find all lines that start with # and delete them, leaving everything else.”
More Related Contents:
- Some troubles with using sed and awk [closed]
- sed substitution with Bash variables
- How can I do a recursive find/replace of a string with awk or sed?
- How to pass a variable containing slashes to sed
- sed search and replace strings containing / [duplicate]
- How can I remove the first line of a text file using bash/sed script?
- Remove first N lines of a file in place in unix command line
- How to address error “bash: !d’: event not found” in Bash command substitution [duplicate]
- How to add to the end of lines containing a pattern with sed or awk?
- Why does sed not replace all occurrences?
- Insert newline (\n) using sed
- How do I escape slashes and double and single quotes in sed?
- How to use a bash script variable with sed [duplicate]
- How to remove double-quotes in jq output for parsing json files in bash?
- Use sed to replace all backslashes with forward slashes
- Escaping forward slashes in sed command [duplicate]
- sed replace with variable with multiple lines [duplicate]
- How to find/replace and increment a matched number with sed/awk?
- Expand variables in sed
- sed multiline delete with pattern
- Using sed to insert file content
- How to match a single quote in sed
- find difference between two text files with one item per line [duplicate]
- Can I use sed to manipulate a variable in bash?
- Grep output with multiple Colors?
- Using SED with wildcard
- escaping newlines in sed replacement string
- How to append a string at end of a specific line in a file in bash [duplicate]
- How to replace paired square brackets with other syntax with sed?
- How to grep for case insensitive string in a file?