On 03/28/2012 10:26 AM, Lee Essen wrote: >> + # 'limit', 'in' and 'next' are reserved keywords >> + if [ "$arg" = "limit" -o "$arg" = "in" -o "$arg" = "next" ]; 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=_$arg ;; esac > > 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=_$arg ;; esac -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature