I’m getting stuck on this one. I want to match all lines that start with exactly, say, 8 spaces and then a double quote mark.
cat file.txt | grep '[[:space:]]\{8\}"'
What am I doing wrong there? It’s matching lines that start with more than 8 spaces also.
cat file.txt | grep '^[[:space:]]\{8\}"'If you don’t put
^, it will match 8 spaces which is near to your".