I’m trying to use egrep with a regex pattern to match whitespace.
I’ve used RegEx with Perl and C# before and they both support the pattern \s to search for whitespace. egrep (or at least the version I’m using) does not seem to support this pattern.
In a few articles online I’ve come across a shorthand [[:space:]], but this does not seem to work. Any help is appreciated.
Using: SunOS 5.10
I see the same issue on SunOS 5.10.
/usr/bin/egrepdoes not support extended regular expressions.Try using
/usr/xpg4/bin/egrep:Another option might be to just use perl: