bug-coreutils
[Top][All Lists]
Advanced

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

Re: litte understanding problem with test


From: Jim Meyering
Subject: Re: litte understanding problem with test
Date: Fri, 18 May 2007 09:42:01 +0200

Alexander Kahl <address@hidden> wrote:
> echo foo>file
> chmod 444 file
> test ! -w file && echo "no write permission"
>
> no output was given back.

It should indeed write "no write permission".
However, the "test" program you're using there
is probably the built-in one from your shell, and
not the one from coreutils.

If you want to use a specified binary,
invoke it like this, for example:

  /usr/bin/test ! -w file && echo "no write permission"




reply via email to

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