Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: problem with [[ -s /some/file ]] under 3.0.4



On 2 Jul 1997 08:41:48 +1000, Timothy Luoma <luomat@xxxxxxxx> wrote:
:Hrm.... I just installed 3.0.4 and there seems to be a rather basic flaw:

  case 's':
    return ((st = getstat(c->left)) && !!(st->st_size));

Well, either your compiler must be doing something really strange since
!!0 == 0  for most people, or you've done something strange elsewhere,
or your stat routines don't work.

% rm whatever
% touch whatever
% [[ -s whatever]] && echo yes || echo no
no

-- 
Geoff Wing [mason@xxxxxxxxxxxxxxx]   Technical Manager
  Phone    : +61-3-9818 2977         PrimeNet - Internet Consultancy
  Facsimile: +61-3-9819 3788         Web : <URL:http://www.primenet.com.au/>
  Mobile   : 0412 162 441



Messages sorted by: Reverse Date, Date, Thread, Author