Hello All,
I am trying to match white space in patterns through - Grep
I tried [[:space:]] & [[:blank:]] but none of them worked.
Then I tried Perl extension '\s' and it worked.
So just wanted to know if [[:space:]] & [[:blank:]] are still supported or have they become deprecated.
However they have been mentioned in the man page so I guess I am not using it correctly. Any pointers on how to use them?
They work fine in my grep. What pattern matching are you having trouble with?
This worked for me.
cat myfile
this line has spaces.
this tab
thisnone
grep [[:space:]] myfile
this line has spaces.
this tab
Ok got it fixed....
# cat /tmp/test.ldif
As you can see there is space between 'dn:' and 'ou=' in all the lines
Initially I was placing '\*' after [[:space:]] as shown below:
Then I removed the black slash and it worked: