basics
grep -E '^[a-z]+ [0-9]+$' re.txt
Output:
abc 123
What a pattern is
A pattern describes text
grep prints lines that contain a match
sed edits text with a pattern
awk splits and filters by field
Escapes
\. matches a literal dot
\d matches a digit in PCRE, not in POSIX
\w matches word characters in PCRE
In POSIX ERE, use [0-9] and [A-Za-z0-9_]
Case sensitivity
grep -i ignores case
grep without it is case sensitive
Do not assume either, say it in the command
Next
Classes in 02 classes
Posted