[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problems with AM_GNU_GETTEXT_VERSION
From: |
Eric Blake |
Subject: |
Re: problems with AM_GNU_GETTEXT_VERSION |
Date: |
Sat, 19 Jan 2008 07:29:42 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Bruno Haible on 1/18/2008 4:30 PM:
| !
sed_extract_AM_GNU_GETTEXT_VERSION_argument='s/^AM_GNU_GETTEXT_VERSION(\([^()]*\)).*$/\1/'
| ! sed_remove_outer_brackets='s/^\[\(.*\)\]$/\1/'
| ! xver=`cat "$configure_in" | grep '^AM_GNU_GETTEXT_VERSION(' | sed -n
- -e "$sed_extract_AM_GNU_GETTEXT_VERSION_argument"p | sed -e
"$sed_remove_outer_brackets" | sed -e 1q`
Isn't that rather process-intensive? You have a useless use of cat. You
should never need grep piped into sed; let sed's regex matching do the
work instead. Multiple invocations of sed can often be collapsed into a
single invocation. And sed can portably be used without -e. What about:
xver=`sed -n '/^AM_GNU_GETTEXT_VERSION(/ {
~ '"$sed_extract_AM_GNU_GETTEXT_VERSION_argument"'
~ '"$sed_remove_outer_brackets"'p
~ q
}' "$configure_in"`
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHkglW84KuGfSFAYARAu1+AKCZiTYmzbzBKHkWTXK27ZnaY4ohOgCgk7YD
9Z99L8A3GoL9e4UgpqSyKb8=
=t3Qx
-----END PGP SIGNATURE-----
- problems with AM_GNU_GETTEXT_VERSION, Michael Bauschert, 2008/01/18
- Re: problems with AM_GNU_GETTEXT_VERSION, Bruno Haible, 2008/01/18
- Re: problems with AM_GNU_GETTEXT_VERSION,
Eric Blake <=
- Re: problems with AM_GNU_GETTEXT_VERSION, Bruno Haible, 2008/01/19
- Re: problems with AM_GNU_GETTEXT_VERSION, Paul Eggert, 2008/01/30
- Re: sed vs. awk, Bruno Haible, 2008/01/30
- Re: sed vs. awk, Micah Cowan, 2008/01/30
- Re: sed vs. awk, Paolo Bonzini, 2008/01/31