Janis Papanagnou wrote:
> On 06.09.2016 19:21, James wrote:
>> Need your wisdom. I wish to grep lines which begin with a space or a tab.
>> What is the best way (using egrep)?
>
> grep '^[[:space:]]'
That will match all whitespace characters, not just space and tab.
Which might be what the OP wants, but to match just space and tab:
grep '^[[:blank:]]'
or:
grep '^[ ]'
(where there is a space and an actual tab between the brackets; in
shells which do filename completion when you press tab you can usually
get a literal tab by preceding it with Ctrl-V).
--
Geoff Clare <
net...@gclare.org.uk>