strip config files of comments

grep -vE '^$|^[\s]*[;#]'
some configuration files, particularly those installed by default as part of a package, have tons of comment lines, to help you know what's possible to configure, and what it means. That's nice, but sometimes you just want to see what specifically what _has_ been configured. That's when I use the above snippet, which I save as a bash alias 'nocom' (for 'no comments'). Apache default config files are perfect examples of when/why this script is handy.

1
2012-01-06 20:53:03

What Others Think

Actually this is a miracle place. Right when I get charge time I should go there and see all work forming which construes that I can do everything to see this spot. Fundamentally monitor http://barbarakite.com/">public speaking coach things for the perfect time when I become free in that time I should go there and see what they are doing. Essentially come and leave a comment for the visitor's book. For this book here are more factors that edify you concerning more west linn aesthetics things for this book. That whole is crucial and you basically take it for you.
Dominick · 83 weeks and 2 days ago
This website will help you to learn more commands and through which you can easily perform tasks. Through a single cbd for pets command here you can perform a task that actually needs a number of programming codes. I am looking here for more details about it.
Alyssalauren · 30 weeks and 3 days ago
This forum really helped me with learning commands. You guys are so helpful and I was able to have my first gig with RB Roofing.
DanielCerritos · 7 weeks and 4 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: