From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCvtQ-0000dx-NN for qemu-devel@nongnu.org; Wed, 28 Mar 2012 12:38:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCvtH-00083I-Re for qemu-devel@nongnu.org; Wed, 28 Mar 2012 12:38:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26608) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCvtH-00082x-Jo for qemu-devel@nongnu.org; Wed, 28 Mar 2012 12:38:31 -0400 Message-ID: <4F733E81.4010805@redhat.com> Date: Wed, 28 Mar 2012 10:38:25 -0600 From: Eric Blake MIME-Version: 1.0 References: <20120328131634.GY32389@garlic> <1332944776-4037-1-git-send-email-alevy@redhat.com> <901A5263-0998-4A6F-B5B2-0C9806B8CA1E@nowonline.co.uk> In-Reply-To: <901A5263-0998-4A6F-B5B2-0C9806B8CA1E@nowonline.co.uk> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigD19F84F1CFC85554B3B2D0A1" Subject: Re: [Qemu-devel] [PATCH 1/2] tracetool: dtrace: handle in and next reserved words List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lee Essen Cc: Stefan Hajnoczi , Alon Levy , "qemu-devel@nongnu.org" , =?ISO-8859-1?Q?Llu=EDs_Vilanova?= This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD19F84F1CFC85554B3B2D0A1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 03/28/2012 10:26 AM, Lee Essen wrote: >> + # 'limit', 'in' and 'next' are reserved keywords >> + if [ "$arg" =3D "limit" -o "$arg" =3D "in" -o "$arg" =3D "nex= t" ]; then [ ... -o ... ] is not portable. POSIX says you must break it into: [ ... ] || [ ... ] or, more efficiently for this particular filtering, rewrite this as: # munge reserved words case $arg in limit | in | next ) arg=3D_$arg ;; esac >=20 > Could we add 'self' to this list? and using case makes it easier to add more reserved words: case $arg in limit | in | next | self ) arg=3D_$arg ;; esac --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigD19F84F1CFC85554B3B2D0A1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPcz6BAAoJEKeha0olJ0NqsLgH/iyYn8vL6h8ZX02IwLQFgduC nbh9V61XveaVvj9DbhMFjI5nOL12Ks1TgzjahUSIvdtCj6yLB701DbZYfrN+BTVi oRdu4Pa3liCqcVPiO89yo0/EGry+1bRkqbYqMTEqM/mKPmB45UXagxBqJ/yI5vUg lHnJ9dgJBII4WmQnT/PXkpdpHP/uFkKMR+ptWJDlLl1EK0AQqx2TbWzbcz64vt6j 3J5HBmsXY47JUO0rBJYd0mlVlj6yvq/D4r9VTQdML9zYeZJ+mR9PSwKpv/7CHvDL TOIS+acscJGDXG6W7gfgUjcTxCL+e46AZQbzLkt5C8P8Lf3AXoIzhp/ceZ5JnLc= =RR9o -----END PGP SIGNATURE----- --------------enigD19F84F1CFC85554B3B2D0A1--