From: Josef Sipek <jsipek@fsl.cs.sunysb.edu>
To: Junio C Hamano <junkio@cox.net>
Cc: Nur Hussein <hussein@cs.usm.my>, git@vger.kernel.org
Subject: Re: [PATCH 1/1] Guilt: Fixed guilt-patchbomb temporary mbox deletion bug
Date: Tue, 6 Mar 2007 02:38:21 -0500 [thread overview]
Message-ID: <20070306073821.GA26626@filer.fsl.cs.sunysb.edu> (raw)
In-Reply-To: <7vvehesvf1.fsf@assigned-by-dhcp.cox.net>
On Mon, Mar 05, 2007 at 11:06:26PM -0800, Junio C Hamano wrote:
> Nur Hussein <hussein@cs.usm.my> writes:
>
> > echo -n "Delete temporary directory? [Y/n] "
> > read n
> >
> > -[ "$n" != "n" -a "$n" != "N" ] && exit 0
> > +[ "$n" != "n" -o "$n" != "N" ] && exit 0
> > rm -rf $dir
>
> Is it just me who finds this much more readable?
>
> case "$n" in [nN]*) exit 0 ;; esac
I don't know. I never saw case being "abused" as the condition in a while
loop either. I guess it is really a matter of taste. For anything more
complex then [nN] I'd go with the case statement as well.
I hear that the whole while-case is just an optimization for sh of many
moons ago - something about case being builtin but test not.
Josef "Jeff" Sipek.
--
Only two things are infinite, the universe and human stupidity, and I'm not
sure about the former.
- Albert Einstein
next prev parent reply other threads:[~2007-03-06 7:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-06 7:01 [PATCH 1/1] Guilt: Fixed guilt-patchbomb temporary mbox deletion bug Nur Hussein
2007-03-06 7:06 ` Junio C Hamano
2007-03-06 7:38 ` Josef Sipek [this message]
2007-03-06 7:47 ` Josef Sipek
2007-03-06 7:53 ` Josef Sipek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070306073821.GA26626@filer.fsl.cs.sunysb.edu \
--to=jsipek@fsl.cs.sunysb.edu \
--cc=git@vger.kernel.org \
--cc=hussein@cs.usm.my \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).