Reputation: 1880
these are possible use cases, different samples of line from a file. These lines would be containing only one checkWord.
> checkWord
> checkWord
> checkWord
> <tab> <tab> checkWord
> <tab>checkWord
> checkWord<tab>
how to grep all such cases?
Upvotes: 0
Views: 637
Reputation: 785246
You can grep
using:
grep '^[[:blank:]]*checkWord'
^[[:blank:]]*
matches 0 or more space or tab characters at the start of line.
Upvotes: 1