X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=u9F3hJEsJRyr+Do1uyfpQnWAmWblofLqEWUKNtm1gUQ bm5FU0LRnsyMLkzJ6UveFAnb585KZe7ZaEQ8PnyPXCsyc9krRAXU+53cQy4p5+T7 F6SNLBZh0FVuFbLWOugvd5y6O+0e+BhQZ6FcTfMxHOc1J+15YOcKnlC3Y+c31B6g = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=b8hMyzu12mANhkAJPgTUzXS82jI=; b=gXx0VbSPciM/PSnTJ MUp+voTuQlBpN9C07l4lGtcuNp7pM59PvrSdANrVemwuu2oUjkGQtC9YXQZp4gWQ 1UF588QyNceT4nJDVqQ+LlsbLjCYJF7s6RCgtwyy1+zVlgDTvXIBKYg3MIAoYrDs j3KtCi7jBqP56RJaj4HVD7x1lw= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: <cygwin.cygwin.com> List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com> List-Archive: <http://sourceware.org/ml/cygwin/> List-Post: <mailto:cygwin AT cygwin DOT com> List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: qmta08.emeryville.ca.mail.comcast.net Message-ID: <53A078BD.9020402@raelity.com> Date: Tue, 17 Jun 2014 10:19:57 -0700 From: Ernie Rael <err AT raelity DOT com> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Change PS1 when running as administrator 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> In-Reply-To: <1195111819.20140617203419@yandex.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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