strip_file_stdout
# # strips the given file and writes to stdout: # # - hashmark comments through EOL # - any whitespace leading up to them # - all blank lines # strip_file_stdout () { cat "$1" | sed -r 's/[[:blank:]]*#.*$//' | sed -r '/^[[:blank:]]*$/d' } # vim:syn=sh:ft=sh