[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Detecting GNU sed
From: |
Alexandre Oliva |
Subject: |
Re: Detecting GNU sed |
Date: |
31 Oct 2000 15:47:17 -0200 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) |
On Oct 31, 2000, Pavel Roskin <address@hidden> wrote:
> Hello, Alexandre!
>> > +(echo 'xyz-xY' | $sed 's/\bx.\b/XY/' | grep 'xyz-XY') >/dev/null 2>&1 ||
>> Use test "x`echo ... | $sed ...`" = "x..." instead. Other than that,
>> ok.
> Search for the word "avoidable" in the documentation. It is exactly about
> what you are suggesting.
Indeed. I recalled there was something about not using grep for this
kind of test in the docs, but I didn't recall we had decided for
case.
> -$sed --version </dev/null >/dev/null 2>&1 ||
> - { echo autoupdate requires GNU sed >&2; exit 77; }
> +case x`echo 'xyz-xY' | $sed 's/\bx.\b/XY/' 2>/dev/null` in
> + xxyz-XY*);;
> + *) echo autoupdate requires GNU sed >&2; exit 77 ;;
> +esac
Ok. Thanks,
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer address@hidden, redhat.com}
CS PhD student at IC-Unicamp address@hidden, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me