Change PS1 when running as administrator
Ernie Rael
err@raelity.com
Tue Jun 17 17:22:00 GMT 2014
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.
In any event, looks like
[[ $(id -G) =~ (^| )544($| ) ]]
would work.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list