Finds lines with a total of 10 characters & Z endings.
grep " ^.\{9\}z$ " /usr/share/dict/Wordsabdul- Azizausterlitzchattererzchervonetzrabinowitzrazzmatazzroquellorzrosenkranztau-~]#
Find a/b/c Start & 21-bit lines that are S
grep " ^[a,b,c]...................s " /usr/share/dict/wordsall-Comprehensivenessantienvironmentalistsantiinstitutionalistsbras- dessus-bras-dessousbrigantinebrigantineschlamydobacteriaceousclothes-~]#
Find the line that starts with a two-digit number:
[[email protected] ~]# grep " Span style= "COLOR: #800000" >^[0-9][0-9] "/usr/share/dict/words 1080 10 - Span style= "COLOR: #000000" >point10th 11 - Point 12 -point 16 -point -point 20 - point 30 -30 48 -point[[email protected] ~]#
Find the line that begins with a/b/c, not the a/b/c end:
grep " ^[a,b,c][^a,b,c]$ " /usr/share/dict/wordsa'A-a.a1ad
Look for lines that start with a/b/c and end with capital letters:
grep " ^[a-c].*[a-z]$ " /usr/share/dict/wordschloramine-~]#
Regular Expressions & grep