[Gllug] Yes or no?
Ben Fitzgerald
ben_m_f at yahoo.co.uk
Tue Nov 29 12:32:38 UTC 2005
On Tue, Nov 29, 2005 at 12:01:53PM +0000, Ian Scott wrote:
> On Mon, Nov 28, 2005 at 06:58:12PM +0000, Nix wrote:
> > #!/bin/bash
> > read x
> > case $x in
> > [yY]*) echo thanks for saying yes;;
> > esac
> >
> > which also lets you say yeah, yep, and so on.
> >
>
>
> <pickygit>
> Of course, it also let's you say:
>
> you know, I'm not really sure.
>
> or
>
>
> YIKES! I don't think so
>
>
> </pickygit>
my thoughts exactly. insist on "yes" or "no", stick it in a while loop.
let them type until they die if the cannot put one or the other! :-)
ben.
--
Registered Linux user number 339435
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list