How to find a space in a text. using grep?
How to grep one space in text ?
cat a.txt| grep ' '
cat a.txt| grep '\s '
Gratuitous use of `cat` in both cases. The first could be written `grep ' ' a.txt`, the second altered similarly.
Note that `\s` also matches tab, return, vertical tab, form feed and, technically, newline. If you want to only match space and tab, use `[[:blank:]]` or `[ \t]`.
This is more simple egrep "\s" a.txt