What are the additional egrep symbols?

Answer Posted / vijesh

-b Precede each line by the block number on which
it was
found. This can be useful in locating block
numbers by
context (first block is 0).

-c Print only a count of the lines that contain
the pat-
tern.

-e pattern_list
Search for a pattern_list (full regular
expression
that begins with a -).

-f file
Take the list of full regular expressions from
file.

-h Suppress printing of filenames when searching
multiple
files.

-i Ignore upper/lower case distinction during
comparis-
ons.

-l Print the names of files with matching lines
once,
separated by NEWLINEs. Does not repeat the
names of
files when the pattern is found more than once.

-n Precede each line by its line number in
the file
(first line is 1).

-s Work silently, that is, display nothing except
error
messages. This is useful for checking the
error
status.

-v Print all lines except those that contain the
pattern.


-x Consider only input lines that use all
characters in
the line to match an entire fixed string or
regular
expression to be matching lines.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is shell a part of kernel?

563


What is option in shell script?

561


What is console line?

574


How to print pid of the current shell?

606


What are types of shells?

553






How will you connect to a database server from linux?

557


Is shell scripting difficult?

559


When should shell programming/scripting not be used?

598


How are shells born?

563


What is shell and terminal?

577


I have 2 files and I want to print the records which are common to both.

704


Determine the output of the following command: [ -z “” ] && echo 0 || echo 1

560


What is the use of a shebang line?

625


Explain about return code?

637


Why do we write bin bash in shell scripts?

548