Re: Bourne shell short-circuit operators improperly documented
Adrian Wontroba <aw1@stade.co.uk> writes:
> Perhaps the syntax could have been " and " / " or " (as in Perl's
> and / or statement qualifiers (something() or die "oops";), but it is
> far too late to change sh syntax. We have to live with it or use a
> different shell or language.
Pop quiz: what are the semantics of the follwing command line after your
proposed change:
echo I need a box and cat litter for my new kittens.
There is absolutely nothing surprising or illogical about the && and ||
command separators.
There is absolutely nothing surprising about "zero means success, non-
zero means failure" either - that's how most Unix system calls and many
standard C library functions work.
I'm sure we all have better things to do than argue about this non-
issue.
DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no
_______________________________________________
freebsd-chat@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-chat
To unsubscribe, send any mail to "freebsd-chat-unsubscribe@freebsd.org"
討論串 (同標題文章)
完整討論串 (本文為第 9 之 10 篇):