Output files without comments or empty lines

grep -v "^\($\|#\)" <filenames>
Filter comments and empty lines in files. I find this very useful when trying to find what values are actually set in a very long example config file. I often set an alias for it, like : alias nocomment='grep -v "^\($\|#\)"'
Sample Output
$ grep -v "^\($\|#\)" /etc/apt/sources.list
deb http://mc.archive.ubuntu.com/ubuntu/ intrepid main restricted
deb-src http://mc.archive.ubuntu.com/ubuntu/ intrepid main restricted
deb http://mc.archive.ubuntu.com/ubuntu/ intrepid-updates main restricted
deb-src http://mc.archive.ubuntu.com/ubuntu/ intrepid-updates main restricted

2
By: raphink
2009-02-16 21:40:09

1 Alternatives + Submit Alt

What Others Think

sed alternative is: sed '/ *#/d; /^ *$/d' filename
alperyilmaz · 661 weeks and 5 days ago
This particular command will discuss the details regarding how to output files without comments or empty lines. I found these cbd oil extraction methods comments very useful for me. There are so many such online services that provide easy learning ideas for students. Keep sharing more updates here.
Alyssalauren · 26 weeks and 4 days ago
I promise home health care waco tx
tillyracker · 22 weeks and 6 days ago
I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. ASTM Level 3
jackson2321 · 16 weeks and 5 days ago
Thanks for the tips guys. They were all great. I have been having issues with being fat both mentally and physically. Thanks to you guys i have been showing improvements. Do post more. ??
jackson2321 · 16 weeks and 2 days ago
Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. There tend to be not many people who can certainly write not so simple posts that artistically. Continue the nice writing Pagalmovies
jackson2321 · 16 weeks and 1 day ago
I truly welcome this superb post that you have accommodated us. I guarantee this would be valuable for the vast majority of the general population. alley cats
jackson2321 · 16 weeks and 1 day ago
We're quite prepared to look for this incredible website and additionally had experience checking advantageous articles or reviews shared right. All the choices for the journalist was first stunning, regards for those present. onewalmartone
KayGasaway · 15 weeks and 1 day ago
I think this is definitely an amazing project here. So much good will be coming from this project. The ideas and the work behind this will pay off so much. http://payslipview.pro/
KayGasaway · 14 weeks and 3 days ago
You have a good point here!I totally agree with what you have said!!Thanks for sharing your views...hope more people will read this article!!! Sha-256 miners
KayGasaway · 13 weeks and 3 days ago
Hi there, I found your blog via Google while searching for such kinda informative post and your post looks very interesting for me. serie stream
KayGasaway · 12 weeks and 6 days ago
Particular interviews furnish firsthand message on mart size, industry trends, ontogeny trends, capitalist landscape and outlook, etc. http://instachatbot.io">best chatbot for shopify
jackson2321 · 12 weeks and 4 days ago
This is extremely fascinating substance! I have completely delighted in perusing your focuses and have reached the conclusion that you are right about a hefty portion of them. You are extraordinary. ???????
KayGasaway · 12 weeks and 1 day ago
If you don"t mind proceed with this extraordinary work and I anticipate a greater amount of your magnificent blog entries.  GBWhatsApp Pro APK
jackson2321 · 11 weeks and 5 days ago
I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much. writing a business plan
jackson2321 · 11 weeks ago
I needed to thank you for this incredible read!! I unquestionably adored each and every piece of it. I have you bookmarked your site to look at the new stuff you post. 1337X
KayGasaway · 10 weeks and 6 days ago
I definitely enjoying every little bit of it. It is a great website and nice share. I want to thank you. Good job! You guys do a great blog, and have some great contents. Keep up the good work. Ome
jackson2321 · 9 weeks and 5 days ago
I genuinely believed you would probably have something useful to say. All I hear is a bunch of whining about something that you can fix if you were not too busy looking for attention. After all, I know it was my choice to read.. ??????
jackson2321 · 8 weeks and 5 days ago
Extremely helpful post. This is my first time i visit here. I discovered such a large number of intriguing stuff in your blog particularly its exchange. Truly its extraordinary article. Keep it up. visit site
jackson2321 · 8 weeks ago
"Die Experten für Flottenversicherungen. Seit über vier Jahrzehnten garantieren wir unseren Kunden die bestmöglichen Flotten & Fuhrparkversicherungen." LKW Versicherung
flottex0 · 4 weeks and 4 days ago
Being a worldwide data recovery company, PITS Global Data Recovery Services has been providing high-quality data repair and retrieval services for years. As a reliable resource in the industry, we work with state-of-the-art tools, certified cleanroom, and advanced data recovery software. Our company holds a wide network of facilities all over the country, which allows us to offer the fastest time turnaround. We try to make sure that our clients get the best of the best service possible. Thus, all our locations are equipped with advanced and brand-new technologies. Through years of hard work, we gained the trust of modern technology users all over the world. professional data recovery services
pitsdatareco · 1 week and 2 days ago
Being a worldwide data recovery company, PITS Global Data Recovery Services has been providing high-quality data repair and retrieval services for years. As a reliable resource in the industry, we work with state-of-the-art tools, certified cleanroom, and advanced data recovery software. Our company holds a wide network of facilities all over the country, which allows us to offer the fastest time turnaround. We try to make sure that our clients get the best of the best service possible. Thus, all our locations are equipped with advanced and brand-new technologies. Through years of hard work, we gained the trust of modern technology users all over the world. [url=https://www.pitsdatarecovery.net/services/]data retrieval service[/url]
pitsdatareco · 1 week and 2 days ago
https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/   https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/ https://seofox.ir/gray-hat-seo/
seofox · 1 week and 2 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: