[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: extension of file-test primitives?
From: |
DJ Mills |
Subject: |
Re: extension of file-test primitives? |
Date: |
Wed, 23 Aug 2017 16:11:17 -0400 |
On Wed, Aug 23, 2017 at 3:57 PM, Eric Blake <eblake@redhat.com> wrote:
>
> Not just deprecated, but inherently ambiguous. There are situations
> where you CANNOT tell whether the user meant -a to mean the binary
> operator or a string being tested against, because POSIX (intentionally)
> does not specify enough precedence rules in how to parse > 4 arguments.
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3266
> Virtualization: qemu.org | libvirt.org
>
>
What would you expect [ ! -a foo ] to do?
It's always true, because it treats -a as the logical AND there. And that's
with 3 arguments, which is defined but unexpected behavior
- Re: extension of file-test primitives?, (continued)
- Re: extension of file-test primitives?, Chet Ramey, 2017/08/23
- Re: extension of file-test primitives?, Dethrophes, 2017/08/23
- Re: extension of file-test primitives?, Chet Ramey, 2017/08/23
- Re: extension of file-test primitives?, dethrophes, 2017/08/23
- Re: extension of file-test primitives?, Chet Ramey, 2017/08/23
- Re: extension of file-test primitives?, dethrophes, 2017/08/23
- Re: extension of file-test primitives?, Chet Ramey, 2017/08/23
- Re: extension of file-test primitives?, dethrophes, 2017/08/23
- Re: extension of file-test primitives?, Chet Ramey, 2017/08/23
- Re: extension of file-test primitives?, Eric Blake, 2017/08/23
- Re: extension of file-test primitives?,
DJ Mills <=
- Re: extension of file-test primitives?, Chet Ramey, 2017/08/24
- Re: extension of file-test primitives?, Greg Wooledge, 2017/08/23
- Re: extension of file-test primitives?, dethrophes, 2017/08/23
- Re: extension of file-test primitives?, L A Walsh, 2017/08/23
- Re: extension of file-test primitives?, Peter & Kelly Passchier, 2017/08/23
- Re: extension of file-test primitives?, Greg Wooledge, 2017/08/23
- Re: extension of file-test primitives?, Chet Ramey, 2017/08/23
Re: extension of file-test primitives?, Chet Ramey, 2017/08/21