From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCvyJ-0001xT-2c for qemu-devel@nongnu.org; Wed, 28 Mar 2012 12:43:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCvyC-0000kN-WE for qemu-devel@nongnu.org; Wed, 28 Mar 2012 12:43:42 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:61760) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCvyC-0000kA-Rt for qemu-devel@nongnu.org; Wed, 28 Mar 2012 12:43:36 -0400 Received: by ghrr14 with SMTP id r14so1102583ghr.4 for ; Wed, 28 Mar 2012 09:43:33 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1332944776-4037-1-git-send-email-alevy@redhat.com> References: <20120328131634.GY32389@garlic> <1332944776-4037-1-git-send-email-alevy@redhat.com> Date: Wed, 28 Mar 2012 17:43:33 +0100 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Alon Levy Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, =?UTF-8?Q?Llu=C3=ADs_Vilanova?= 2012/3/28 Alon Levy : > - =C2=A0 =C2=A0 =C2=A0 =C2=A0# 'limit' is a reserved keyword > - =C2=A0 =C2=A0 =C2=A0 =C2=A0if [ "$arg" =3D "limit" ]; then > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0arg=3D"_limit" > + =C2=A0 =C2=A0 =C2=A0 =C2=A0# 'limit', 'in' and 'next' are reserved keyw= ords > + =C2=A0 =C2=A0 =C2=A0 =C2=A0if [ "$arg" =3D "limit" -o "$arg" =3D "in" -= o "$arg" =3D "next" ]; then > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0arg=3D"_$arg" > =C2=A0 =C2=A0 =C2=A0 =C2=A0 fi The test -a and -o options are obsolete in POSIX shell scripts (use "if [ foo ] && [ bar ]" instead). In this case it would be neater to use 'case' anyway: case "$arg" in limit|in|next) arg=3D"_$arg" ;; esac -- PMM