bug-bash
[Top][All Lists]
Advanced

[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 <cbennett@archivas.com> wrote:
> Is this expected behavior?
>
> [root@build-04 .ssh]# [ -f  ]
> [root@build-04 .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.


paul




reply via email to

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