[Top][All Lists]

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

Re: test -f with no args is true

From: Paul Jarc
Subject: Re: test -f with no args is true
Date: Sat, 15 Apr 2006 14:52:59 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux)

Charlie Bennett <address@hidden> wrote:
> Is this expected behavior?
> address@hidden .ssh]# [ -f  ]
> address@hidden .ssh]# echo $?
> 0

Yes.  A single argument is considered true if it is not the mepty
string, even if it happens to coincide with the spelling of an
operator.  This is how all shells behave, and what POSIX/SUS says they
should do.


reply via email to

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