The following table contains a list of the basic building block expressions and metacharacters implemented by the GNU grep command (and most other regex implementations), and their descriptions. ![]() When a match is made, an action defined by the tool in use is taken on the line that contains the matching string. Think of each data stream line as a record, where the tools that use regexes process one record at a time. As we saw in Getting started with regular expressions: An example, the -v option reverses those actions, so that the lines with matches are discarded.Įach line of the data stream is evaluated on its own. ![]() When a match is made, an action is taken on that line as prescribed by the tool being used.įor example, when a pattern match occurs with grep, the usual action is to pass that line to STDOUT and discard lines that do not match the pattern. A pattern created by a combination of one or more expressions is compared against each line of a data stream. ![]() Linux System Administration Skills AssessmentĪll implementations of regular expressions are line-based.Download Now: Basic Linux Commands Cheat Sheet.Advanced Linux Commands Cheat Sheet for Developers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |