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
Time conversion using Bash
Viewed 2790 times since Fri, May 25, 2018
Convert a human readable date to epoch with a shell script on OpenBSD and Mac OS X
Viewed 15245 times since Fri, May 25, 2018
Linux and Unix xargs command tutorial with examples
Viewed 3961 times since Fri, Jun 1, 2018
Display basic information about Physical Volumes
Viewed 3532 times since Sun, Jun 3, 2018
Adding a range of IPs in Linux
Viewed 2751 times since Mon, May 21, 2018
Tunneling With SSH to Your Destination
Viewed 4521 times since Wed, May 30, 2018
Script HW/SW AIX
Viewed 9320 times since Mon, Jun 4, 2018
Linux: Repeat Command N Times – Bash FOR Loop
Viewed 3110 times since Mon, Feb 18, 2019
Utilities to Tidy Up Your Reports
Viewed 16356 times since Wed, May 30, 2018
Usuwanie spacji z zmiennych w bash
Viewed 2559 times since Tue, May 22, 2018