[Gllug] Yes or no?

Jon Dye jon at pecorous.co.uk
Mon Nov 28 09:35:20 UTC 2005


I'm trying to write a small (bash) shell script that will run a program
on each file in a directory, show you the output and then ask you to
confirm or reject the output (and therefore keep or delete the original
file).

It strikes me there should be an easy way to display a question and
prompt for a yes or no (or y and n) answer.  Is there a simple program
that will do this and return with a zero or non-zero result that I could
use in my script?

I'm sure I can work it our using read or something but it seems a bit
clunky.

Suggestions?

JD
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list