remove comments (even those starting with spaces), empty lines (even those containing spaces) in one grep command

grep -vE '^\s*(#|$)' textfile
useful for discarding even those comments which start with blanks or those empty lines which contain blanks
Sample Output
[root@docker ~]# grep -vE '^\s*(#|$)' /etc/nsswitch.conf
passwd:     files sss
shadow:     files sss
group:      files sss
hosts:      files dns myhostname
bootparams: nisplus [NOTFOUND=return] files
ethers:     files
netmasks:   files
networks:   files
protocols:  files
rpc:        files
services:   files sss
netgroup:   nisplus sss
publickey:  nisplus
automount:  files nisplus sss
aliases:    files nisplus

What Others Think

Here the caption is something about remove comments (even those starting with spaces), empty lines (even those containing spaces) in one grep command. Are you up for cheap assignment writing service? It has nothing else except from an image so if you have any idea about the true meaning of it then explain it to me.
sadamn · 71 weeks and 6 days ago
google
arvvaine · 70 weeks and 6 days ago
[google](https://google.com)
arvvaine · 65 weeks and 6 days ago
http://www.google.org/">google
arvvaine · 65 weeks and 6 days ago
[MSN](http://search.msn.com/) [[http://www.edgewall.com|Edgewall Software]]
arvvaine · 65 weeks and 6 days ago
google
arvvaine · 65 weeks and 6 days ago
top resume review
arvvaine · 65 weeks and 6 days ago
One grep command has been doing well since its inception. Things related to comments are clear from this page. Comments can be removed for better results. Now you can check custom essay services to learn more new things to manage their story work. Empty spaces should be resolved. Thanks for sharing this with us.
Strickland1 · 63 weeks and 4 days ago
Do not go where the path may lead, go instead where there is no path and leave a trail. When you know more about this site. geometry dash
YoungHope · 54 weeks and 6 days ago
[url=https://essaysoriginreview.com/]best essay writing services[/url] australian help review
arvvaine · 52 weeks and 5 days ago
I've read all of your information that you shares in your article and I love it. Many thanks for showing this post. I enjoy https://hillclimb-racing.com/
haterse71 · 52 weeks and 4 days ago
Visit our site to find more about wedding photographer Northern Virginia. We offer engagement and proposal photography in Va. targonca szállítás Kecskemét
muneerahmed · 44 weeks and 5 days ago
Yes, great US Military force. Also, in his post you have given a chance to listen about US Military. I really appreciate your work. Thanks for sharing it. http://www.fokuszpalyazat.hu/">pályázatírás Debrecen bármelyik cégének
muneerahmed · 44 weeks and 1 day ago
Thanks for sharing this interesting blog with us.My pleasure to being here on your blog..I wanna come beck here for new post from your site. The Wellington Clinic dentist London
muneerahmed · 35 weeks and 4 days ago
I wanted to thank you for this great read!! I definitely enjoying every part of it I have bookmarked you to check out new postings of you. https://www.hifimodelescortsgurgaon.com/delhi.php | https://www.hifimodelescortsgurgaon.com/callgirlsinbhiwadi.php | https://www.hifimodelescortsgurgaon.com/manesar-escorts.php | https://www.hifimodelescortsgurgaon.com/badshahpur-escorts.php | https://www.hifimodelescortsgurgaon.com/hot-bangalore-escorts.php | https://www.hifimodelescortsgurgaon.com/udaipur-escorts-agency.php | https://www.hifimodelescortsgurgaon.com/ahmedabad-call-girls.php | https://www.hifimodelescortsgurgaon.com/jaipur-call-girls.php | https://www.hifimodelescortsgurgaon.com/imt-manesar-escorts.php | https://www.hifimodelescortsgurgaon.com/hyderabad-escorts-service.php | https://www.hifimodelescortsgurgaon.com/ardee-city-escorts.php | https://www.hifimodelescortsgurgaon.com/mg-road-escorts.php | https://www.hifimodelescortsgurgaon.com/hot-bristol-chowk-escorts.php | https://www.hifimodelescortsgurgaon.com/gurgaon-dlf-city-call-girls.php | https://www.hifimodelescortsgurgaon.com/gurgaon-35-star-hotels-escorts.php | https://www.hifimodelescortsgurgaon.com/gurgaon-sectors.php | https://www.hifimodelescortsgurgaon.com/hot-huda-city-centre-escorts.php | https://www.hifimodelescortsgurgaon.com/russian-golf-course-escorts.php | https://www.hifimodelescortsgurgaon.com/hifi-sohna-road-escorts.php | https://www.hifimodelescortsgurgaon.com/vip-udyog-vihar-escorts.php | https://www.hifimodelescortsgurgaon.com/hot-rajiv-chowk-escorts.php | https://www.hifimodelescortsgurgaon.com/sexy-palam-vihar-escort.php | https://www.hifimodelescortsgurgaon.com/iffco-chowk-escorts.php | https://www.hifimodelescortsgurgaon.com/surajkund-escorts.php | https://www.hifimodelescortsgurgaon.com/sikanderpur-escorts.php | https://www.hifimodelescortsgurgaon.com/about-gurgaon-model-escorts.php | https://www.hifimodelescortsgurgaon.com/photogalleryofgurgaonescorts.php |
Sheebasaifi50 · 13 weeks and 5 days ago
This will make my project with Pest Control Oakland a lot easier. Thank you for the command suggestion.
MarkMatthews · 13 weeks and 4 days ago
Great Information sharing .. I am very happy to read this article .. thanks for giving us go through info.Fantastic nice. I appreciate this post. scamrisk
seomind · 1 week and 3 days ago
It is the intent to provide valuable information and best practices, including an understanding of the regulatory process. scamrisk
seomind · 1 week and 3 days ago
I don’t think many of websites provide this type of information. scamrisk
seomind · 1 week and 3 days ago
I'm happy to see the considerable subtle element here!. scamrisk
seomind · 1 week and 3 days ago
Your site is truly cool and this is an extraordinary moving article. scamrisk
seomind · 1 week and 3 days ago
Very nice article, I enjoyed reading your post, very nice share, I want to twit this to my followers. Thanks!. scamrisk
seomind · 1 week and 3 days ago
I need to to thank you for this very good read!! I definitely loved every little bit of it. I have you bookmarked to check out new things you post… scamrisk
seomind · 1 week and 3 days ago
This is just the information I am finding everywhere. Thanks for your blog, I just subscribe your blog. This is a nice blog.. scamrisk
seomind · 1 week and 3 days ago
You know your projects stand out of the herd. There is something special about them. It seems to me all of them are really brilliant! scamrisk
seomind · 1 week and 3 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: