View Config Files Without Comments
Article Number: 23 | Rating: Unrated | Last Updated: Mon, May 21, 2018 9:23 PM
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/
Posted - Mon, May 21, 2018 8:38 PM. This article has been viewed 2434 times.
Filed Under:
Bash
There are no attachments for this article.
Related Articles

10 Xargs Command Examples in Linux / UNIX
Viewed 4119 times since Fri, Jun 1, 2018
awk printf
Viewed 15519 times since Wed, Aug 19, 2020
perl podstawy
Viewed 2134 times since Mon, May 21, 2018
Time conversion using Bash
Viewed 2833 times since Fri, May 25, 2018
10 Awk Tips, Tricks and Pitfalls
Viewed 6097 times since Wed, Aug 19, 2020
Epoch & Unix Timestamp Conversion Tools
Viewed 63260 times since Fri, Jun 22, 2018