Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Maildir empty?
- X-seq: zsh-users 7692
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: Peter Whaite <peta@xxxxxxxxx>
- Subject: Re: Maildir empty?
- Date: Tue, 13 Jul 2004 13:28:27 -0500
- Cc: ZSH User List <zsh-users@xxxxxxxxxx>
- In-reply-to: <200407121804.i6CI4W3j005637@xxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20040712143306.GB2502@DervishD> <200407121804.i6CI4W3j005637@xxxxxxxxxxxxxxxxxxx>
In the last episode (Jul 12), Peter Whaite said:
> DervishD <raul@xxxxxxxxxxxx> wrote:
> > > I can only give a partial answer. `[' is treated like any other
> > > command, so its arguments are subject to filename expansion.
>
> It used to be that /bin/[ was a link to /bin/test, which is why
> /bin/test still swallows a trailing ]. Now wasn't that clever!
Getting off-topic :) but if your test eats a trailing bracket it's a
bug. When test and [ are hardlinked, the program must check argv[0]
and only eat a right-bracket if it was run as [.
$ ls -la =test =\[
814 -r-xr-xr-x 2 root wheel 93948 Nov 26 2003 /bin/[
814 -r-xr-xr-x 2 root wheel 93948 Nov 26 2003 /bin/test
$ command test "]" ; echo $?
0
$ command "[" "]" ; echo $?
1
SYNOPSIS
test expression
[ expression ]
The test utility evaluates the expression and, if it evaluates to
true, returns a zero (true) exit status; otherwise it returns 1
(false). If there is no expression, test also returns 1 (false).
...
The following primaries are used to construct expression:
...
_string_ True if _string_ is not the null string.
--
Dan Nelson
dnelson@xxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author