bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The test command


From: Bart Schaefer
Subject: Re: The test command
Date: Tue, 12 Sep 2006 18:16:47 -0700

I'm CC'ing this to bug-coreutils with the full expectation that it'll
bounce because I'm not subscribed.

On Sep 12, 11:20am, Dave Yost wrote:
}
} I propose this addition to the age-old test command:

Unlikely.  It breaks backwards compatibility.  "test" is one of those
things that's now SO old, that essentially no changes are allowed. [*]

The meaning of
        test --verbose
is equivalent to
        test --verbose != ''
and there might somewhere be a script that depends upon
        string=--verbose
        test $string
to work correctly.

} The usefulness of this is shown in this example:
} 
}    if ! test --verbose -e "$file" ; then
}      exit $?
}    fi

    zmodload -i zsh/system
    if ! test -e "$file"; then
      syserror >&2
      exit $?
    fi

[*] Zsh sometimes makes exceptions in places where a syntax error would
occur in the older version of the command, but never in places where the
change would alter the semantics of working syntax.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]