zsh-workers
 help / color / mirror / code / Atom feed
* problem with [[ -s /some/file ]]  under 3.0.4
@ 1997-07-01 22:22 Timothy Luoma
  1997-07-01 22:33 ` Philip Kizer
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Timothy Luoma @ 1997-07-01 22:22 UTC (permalink / raw)
  To: zsh-workers


Hrm.... I just installed 3.0.4 and there seems to be a rather basic flaw:


/bin/rm -f /tmp/filezero
touch /tmp/filezero
ls -l = -rw-r--r--   1 luomat   wheel           0 Jul  1 18:16 /tmp/filezero


if [[ -s /tmp/filezero ]]                                                     
    then
	echo yes
else
	echo no
fi

result: yes

	###########################

Previously I was using 3.0.2 which worked fine:


/bin/rm -f /tmp/filezero
touch /tmp/filezero
	-rw-r--r--   1 luomat   wheel           0 Jul  1 18:16 /tmp/filezero


if [[ -s /tmp/filezero ]]                                                     
    then
	echo yes
else
	echo no
fi

result: no

Anyone else see this?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem with [[ -s /some/file ]] under 3.0.4
  1997-07-01 22:22 problem with [[ -s /some/file ]] under 3.0.4 Timothy Luoma
@ 1997-07-01 22:33 ` Philip Kizer
  1997-07-02  3:42 ` Geoff Wing
  1997-07-02  5:54 ` problem with [[ -s /some/file ]] under 3.0.4 Bart Schaefer
  2 siblings, 0 replies; 5+ messages in thread
From: Philip Kizer @ 1997-07-01 22:33 UTC (permalink / raw)
  To: luomat; +Cc: zsh-workers


Timothy Luoma <luomat@peak.org> wrote:
>Hrm.... I just installed 3.0.4 and there seems to be a rather basic flaw:
>Anyone else see this?

Nope:

user@machine:/ # echo $ZSH_VERSION
3.0.4
user@machine:/ # touch /tmp/hi
user@machine:/ # ls -l /tmp/hi
-rw-r--r--   1 user     user            0 Jul  1 17:30 /tmp/hi
user@machine:/ # if [[ -s /tmp/hi ]] ; then echo yes ; else echo no ; fi
no
user@machine:/ # ls -l /tmp/hi
-rw-r--r--   1 user     user            0 Jul  1 17:30 /tmp/hi


____________________________________________________________ Philip Kizer ___
Texas A&M CIS Operating Systems Group, Unix ( 409.862.4120 ) pckizer@tamu.edu


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem with [[ -s /some/file ]]  under 3.0.4
  1997-07-01 22:22 problem with [[ -s /some/file ]] under 3.0.4 Timothy Luoma
  1997-07-01 22:33 ` Philip Kizer
@ 1997-07-02  3:42 ` Geoff Wing
  1997-07-02 19:00   ` NeXTStep cc? (Re: problem with [[ -s /some/file ]] under 3.0.4) Timothy Luoma
  1997-07-02  5:54 ` problem with [[ -s /some/file ]] under 3.0.4 Bart Schaefer
  2 siblings, 1 reply; 5+ messages in thread
From: Geoff Wing @ 1997-07-02  3:42 UTC (permalink / raw)
  To: zsh-workers

On 2 Jul 1997 08:41:48 +1000, Timothy Luoma <luomat@peak.org> 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@primenet.com.au]   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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem with [[ -s /some/file ]]  under 3.0.4
  1997-07-01 22:22 problem with [[ -s /some/file ]] under 3.0.4 Timothy Luoma
  1997-07-01 22:33 ` Philip Kizer
  1997-07-02  3:42 ` Geoff Wing
@ 1997-07-02  5:54 ` Bart Schaefer
  2 siblings, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 1997-07-02  5:54 UTC (permalink / raw)
  To: luomat, zsh-workers

On Jul 1,  6:22pm, Timothy Luoma wrote:
} Subject: problem with [[ -s /some/file ]]  under 3.0.4
}
} /bin/rm -f /tmp/filezero
} touch /tmp/filezero
} if [[ -s /tmp/filezero ]]                                                     
}     then
} 	echo yes
} else
} 	echo no
} fi
} 
} result: yes

I'm not able to reproduce this.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

* NeXTStep cc? (Re: problem with [[ -s /some/file ]]  under 3.0.4)
  1997-07-02  3:42 ` Geoff Wing
@ 1997-07-02 19:00   ` Timothy Luoma
  0 siblings, 0 replies; 5+ messages in thread
From: Timothy Luoma @ 1997-07-02 19:00 UTC (permalink / raw)
  To: Geoff Wing; +Cc: zsh-workers

On 2 Jul 1997, Geoff Wing wrote:

> 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

Well I had built it 4fat under NEXTSTEP using the stock cc (as I had done
before).  It gave me a lot of error 'warnings' but none fatal.

I rebuilt it using gcc and it works.

hrm.

Some day perhaps I'll try again, but not for awhile I think....

TjL



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1997-07-02 19:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-07-01 22:22 problem with [[ -s /some/file ]] under 3.0.4 Timothy Luoma
1997-07-01 22:33 ` Philip Kizer
1997-07-02  3:42 ` Geoff Wing
1997-07-02 19:00   ` NeXTStep cc? (Re: problem with [[ -s /some/file ]] under 3.0.4) Timothy Luoma
1997-07-02  5:54 ` problem with [[ -s /some/file ]] under 3.0.4 Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).