Invert the match

Show a config file without comments and blank lines

grep -v '^#' /etc/nginx/nginx.conf | grep -v '^\s*$'

tool
grep15 commands
tags
grep

More grep commands

all 15 grep commands