Published: 13 January 2025

Remove all comments from a Bash script

:g/^\#/d

Remove all blank lines

:g/^$/d

Tags:


Related Memos: Printing line numbers with cat and grep