Using egrep
Using egrep
, and regular expressions in general, is something like page one, chapter one stuff from the never-written How to be both cool and incredibly useful IT manual. It is, without a shadow of a doubt, the most useful command that was ever invented in the UNIX/Linux world for system administration. It doesn't really matter whether we're looking for a specific string in a file or set of directories, whether we're trying to find a line in a big text file where a specific string is located, or whether we're trying to find where a specific string isn't, egrep
can do all of that for us. We are focusing on egrep
specifically, as it supports both concepts that are behind this command – regular expressions and extended regular expressions. That's where we are going to start – first, by explaining the merits of using regular expressions, and then moving on from that to explain why egrep
is such an important command. So, buckle up...