2012/3/28 Alon Levy <al...@redhat.com>:
> -        # '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

Reply via email to