From: Ernie Rael <err@raelity.com>
To: cygwin@cygwin.com
Subject: Re: Change PS1 when running as administrator
Date: Tue, 17 Jun 2014 17:22:00 -0000 [thread overview]
Message-ID: <53A078BD.9020402@raelity.com> (raw)
In-Reply-To: <1195111819.20140617203419@yandex.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
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
next prev parent reply other threads:[~2014-06-17 17:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-17 8:45 GrahamC
2014-06-17 16:23 ` Ernie Rael
2014-06-17 16:35 ` Andrey Repin
2014-06-17 17:22 ` Ernie Rael [this message]
2014-06-17 19:17 ` Eric Blake
2014-06-17 19:16 ` Eric Blake
-- strict thread matches above, loose matches on Subject: below --
2014-06-16 18:40 GrahamC
2014-06-16 19:00 ` Chris J. Breisch
2014-06-16 20:03 ` Frank Fesevur
2014-06-16 11:24 Frank Fesevur
2014-06-16 19:06 ` Achim Gratz
2014-06-16 20:05 ` Frank Fesevur
2014-06-17 6:53 ` Thomas Wolff
2014-06-17 7:09 ` Achim Gratz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53A078BD.9020402@raelity.com \
--to=err@raelity.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).