This is the mail archive of the
mailing list for the Cygwin project.
Re: Change PS1 when running as administrator
- From: Ernie Rael <err at raelity dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 17 Jun 2014 10:19:57 -0700
- Subject: Re: Change PS1 when running as administrator
- Authentication-results: sourceware.org; auth=none
- References: <1402994703 dot 51470 dot YahooMailNeo at web172206 dot mail dot ir2 dot yahoo dot com> <53A06B0D dot 9050806 at raelity dot com> <1195111819 dot 20140617203419 at yandex dot ru>
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
In any event, looks like
[[ $(id -G) =~ (^| )544($| ) ]]
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple