I'm trying to abbreviate a regex in a grep. I need to match exactly six spaces followed by an alpha character. This works:
grep "^\s\s\s\s\s\s[[:alpha:]]" <filename>
This does not:
grep "^[[:space:]]{6}[[:alpha:]]" <filename>
What am I doing wrong?
[:space:]matches tabs, newlines, vertical tabs, form feeds, carriage returns, and spaces, and[:blank:]matches spaces and tabs. – Christopher Aug 06 '19 at 18:57grep,\sis a synonym for[[:space:]], so the conversion is correct. – Kusalananda Aug 06 '19 at 19:00