Show a config file without comments and blank lines
show config file without comments | grep remove comments and empty lines | show only active settings php.ini | grep | configuration | commentsgrep -Ev '^\s*(#|;|$)' /etc/php/8.2/fpm/php.iniHides all lines that are empty, contain only whitespace, or start with # or ;, even when preceded by spaces. What remains are the effective settings, which shrinks long files like php.ini, my.cnf or sshd_config down to a few lines. Well suited for comparing two servers.
Note: Comments at the end of a line after a setting are kept. The file itself is not modified.
Also searched as
- show config file without comments
- grep remove comments and empty lines
- show only active settings php.ini