On 06/17/2014 11:19 AM, Ernie Rael wrote: > On 6/17/2014 9:34 AM, Andrey Repin wrote: > >>> [[ $(id -G) =~ \b544\b ]] >>> was suggested (the suggestion used symbolic name instead of a number and >>> didn't use word boundary). Seems like word boundary is needed, but I >>> couldn't get this to work. Are the regex boundary matchers not >>> supported by bash =~ operator? >> I don't think bash equivalent of test implements Perl RE. >> Neither the base test implementation, to that extent. > > I thought, perhaps incorrectly, that \b has been around forever and is > posix.
Forever in Linux, but not required by POSIX and not present in BSD (from which Cygwin inherits its regex implementation). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature