LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 01-25-2018, 12:07 AM   #1
Swathi Prasad
LQ Newbie
 
Registered: Jan 2018
Posts: 17

Rep: Reputation: Disabled
need help in understanding the command


Hi,

Can anybody please help me in understanding the below command.

egrep -cv '#|^$'

Thanks
 
Old 01-25-2018, 12:16 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,127

Rep: Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922Reputation: 2922
You have aleready been told to read man pages.
What do you think the command does ?. What do your investigations suggest ?.
 
1 members found this post helpful.
Old 01-25-2018, 12:19 AM   #3
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,642

Rep: Reputation: 277Reputation: 277Reputation: 277
check out this link: http://www.cs.columbia.edu/~tal/3261...i-tutorial.htm

Hopefully, you will read it. Cheers!
 
1 members found this post helpful.
Old 01-26-2018, 09:58 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 21,935

Rep: Reputation: 5803Reputation: 5803Reputation: 5803Reputation: 5803Reputation: 5803Reputation: 5803Reputation: 5803Reputation: 5803Reputation: 5803Reputation: 5803Reputation: 5803
Quote:
Originally Posted by Swathi Prasad View Post
Hi,
Can anybody please help me in understanding the below command.

egrep -cv '#|^$'
You've been told in at least three other threads to read the man pages on the commands:
https://www.linuxquestions.org/quest...ks-4175622265/
https://www.linuxquestions.org/quest...nd-4175622281/
https://www.linuxquestions.org/quest...0/#post5810707

...so repeatedly asking us to explain each command and each option/flag on each command, when **YOU already have that information** is fairly rude. Read the "Question Guidelines" link in my posting signature.
 
1 members found this post helpful.
Old 01-26-2018, 06:19 PM   #5
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004
It might be that he can't find the man page for egrep. Egrep is the same as grep -E. If you run egrep instead of grep, you don't need to put the 'E' after it. For instance, if you look at the contents of /bin/egrep,
Code:
$ less /bin/egrep
you find it is a script
Code:
#!/bin/sh
exec grep -E "$@"
So, just use the grep man page.
 
1 members found this post helpful.
Old 01-27-2018, 08:48 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 21,935

Rep: Reputation: 5803Reputation: 5803Reputation: 5803Reputation: 5803Reputation: 5803Reputation: 5803Reputation: 5803Reputation: 5803Reputation: 5803Reputation: 5803Reputation: 5803
Quote:
Originally Posted by AwesomeMachine View Post
It might be that he can't find the man page for egrep. Egrep is the same as grep -E. If you run egrep instead of grep, you don't need to put the 'E' after it. For instance, if you look at the contents of /bin/egrep,
Code:
$ less /bin/egrep
you find it is a script
Code:
#!/bin/sh
exec grep -E "$@"
So, just use the grep man page.
I get a man page for egrep, and (as you said), it's the same one for grep, and it says this at the top of the man page:
Code:
 grep, egrep, fgrep - print lines matching a pattern
That said, the OP has established a pattern of doing this. This is now their fourth thread with "explain this command"...at some point, the OP needs to put forth some effort into writing a script and doing their own research.
 
Old 02-02-2018, 06:20 AM   #7
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,034
Blog Entries: 13

Rep: Reputation: 3485Reputation: 3485Reputation: 3485Reputation: 3485Reputation: 3485Reputation: 3485Reputation: 3485Reputation: 3485Reputation: 3485Reputation: 3485Reputation: 3485
@Swathi Prasad,

These repeated questions providing zero effort on your part are unacceptable on the LQ site.

You have been referred to our links about how to ask effective questions and informed how the LQ site works on each prior occasion.

This thread and others have been closed to avoid further frustrations on the part of fellow LQ members.

If you persist with repeating this manner of posting, your posting privileges may be affected.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] need help in understanding the command Swathi Prasad Linux - Newbie 3 01-23-2018 10:42 PM
Understanding strace command circus78 Linux - Server 2 04-04-2012 06:18 PM
Need help understanding a command henrtm05 Programming 4 09-26-2010 01:57 PM
help with understanding scp command 7mza Linux - Newbie 4 09-15-2009 03:09 AM
help understanding this command vince_2x Linux - General 4 09-21-2004 12:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration