egrep command

the egrep command is the most powerful member of the grep command family, you can use it like fgrep to search for multiple targets. Like grep, it allows you to use regular expressions to specify targets, but it provides a fuller, more powerful set of regular expression the gr

The grep command accepts all of the basic regular expressions recognized by grep as well as several useful extensions to the set.

You can tell egrep to search for several targets in two ways: by putting them in seperate lines as in fgrep or by seperating them with the vertical bar or pype symbol(|)

eg: the following command uses the pipe symbol to tell egrep to search for entries.

  • $egrep “java|springs|unix” k2schools

Related Posts

You can leave a response, or trackback from your own site.

Leave a Reply

Powered by k2schools
%d bloggers like this: