Linux Commands: Search file(s) for lines that match an extended expression


egrep-Linux Command

egrep

Search file(s) for lines that match an extended expression

SYNTAX
      egrep [ options ] 'PATTERN' files ...

egrep is the same as `grep -E'

all other options are the same as grep 

The PATTERN is a regexp.  In typical usage, the regexp is quoted to
prevent the shell from expanding any of the special characters as file
name wildcards.  Normally, `egrep' prints the lines that matched.  If
multiple file names are provided on the command line, each output line
is preceded by the name of the file and a colon.

OPTIONS

`-c'
     Print out a count of the lines that matched the pattern, instead
     of the lines themselves.

`-s'
     Be silent.  No output is produced, and the exit value indicates
     whether or not the pattern was matched.

`-v'
     Invert the sense of the test. `egrep' prints the lines that do
     *not* match the pattern, and exits successfully if the pattern was
     not matched.

`-i'
     Ignore case distinctions in both the pattern and the input data.

`-l'
     Only print the names of the files that matched, not the lines that
     matched.

`-e PATTERN'
     Use PATTERN as the regexp to match.  The purpose of the `-e'
     option is to allow patterns that start with a `-'.

Related Linux Bash commands:

fgrep - Search file(s) for lines that match a fixed string
grep - Search file(s) for lines that match a given pattern

Other Linux Commands:
alias , break , builtin , cal , case , cat , cd , cfdisk , chgrp , chmod , chown , chroot , cksum , cmp , comm , command , continue , cp , cron , crontab , csplit , cut , date , dc , dd , declare , df , diff , diff3 , dir , dircolors , dirname , dirs , du , echo , egrep , enable , env , eval , exec , expand , export , expr , factor , false , fdformat , fdisk , fgrep , find , fmt , fold , for , fsck , function , getopts , hash , hashcharacter , head , history , hostname , id , if , import , install , join , kill , less , let , ln , local , locate , logname , logout , lpc , lpr , lprm , ls , m4 , man , mbadblocks , mkdir , mkfifo , mknod , more , mount , mtools , mv , nice , nl , nohup , passwd , paste , period , popd , pr , printf , ps , pushd , pwd , quota , quotacheck , quotactl , ram , rcp , read , readonly , return , rm , rmdir , rsync , sdiff , sed , select , seq , set , shift , shopt , shutdown , sleep , sort , split , su , sum , symlink , sync , tac , tail , tar , tee , test , time , times , top , touch , tr , traceroute , true , tsort , tty , type , ulimit , umask , uname , unexpand , uniq , units , unset , unshar , until , useradd , usermod , users , uuencode , watch , wc , whereis , which , while , who , xargs , yes ,
Live2Support.com :
Product - Benefits - Features - How Does it Works - Pricing - SSL Certificates - Signup - Contactus - Login - Submit Resources