|
From: | Peter Maydell |
Subject: | Re: [Qemu-devel] [PATCH 1/2] tracetool: dtrace: handle in and next reserved words |
Date: | Wed, 28 Mar 2012 17:43:33 +0100 |
2012/3/28 Alon Levy <address@hidden>: > - # 'limit' is a reserved keyword > - if [ "$arg" = "limit" ]; then > - arg="_limit" > + # 'limit', 'in' and 'next' are reserved keywords > + if [ "$arg" = "limit" -o "$arg" = "in" -o "$arg" = "next" ]; then > + arg="_$arg" > 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="_$arg" ;; esac -- PMM
[Prev in Thread] | Current Thread | [Next in Thread] |