View Config Files Without Comments

I’ve been using the following grep invocations to trim comments out of config files

 

 

#grep ^[^#] /etc/httpd/conf/httpd.conf
or
#egrep -v "^#|^$" /etc/httpd/conf/httpd.conf
or
#grep -v "^#" /etc/httpd/conf/httpd.conf


source: https://sysadmincorner.wordpress.com/category/aix/
Attachments
There are no attachments for this article.
Related Articles RSS Feed
Transform XML to CSV Format | Unix String Pattern Manipulation The Ugly Way
Viewed 4554 times since Sun, Jan 9, 2022
O’Reilly’s CD bookshelf
Viewed 11286 times since Wed, Jun 27, 2018
30 Handy Bash Shell Aliases For Linux / Unix / MacOS
Viewed 4043 times since Thu, Feb 11, 2021
perl podstawy
Viewed 1772 times since Mon, May 21, 2018
10 Awk Tips, Tricks and Pitfalls
Viewed 5676 times since Wed, Aug 19, 2020
Bash: Read File Line By Line – While Read Line Loop
Viewed 1751 times since Mon, Feb 18, 2019
Epoch & Unix Timestamp Conversion Tools
Viewed 45368 times since Fri, Jun 22, 2018
Linux and Unix xargs command tutorial with examples
Viewed 3584 times since Fri, Jun 1, 2018
Time conversion using Bash
Viewed 2404 times since Fri, May 25, 2018
Display basic information about Physical Volumes
Viewed 3045 times since Sun, Jun 3, 2018