Linux equivalent of Solaris '/bin/ckyorn'

Jerry Feldman gaf at blu.org
Wed Oct 3 10:07:57 EDT 2001


You can easily write it in C or AWK in 10 mins, but it is also easy to do 
in shell script. In ksh for example:
read -r
do 
  case $REPLY in
	y|yes)
		-- do yes stuff;;
	n|no)
		-- do no stuff
	*)
		-- maybe reprompt.
 esac
done


On 3 Oct 2001, at 10:45, Chris Janicki wrote:

> Is there a Linux equivalent of Solaris '/bin/ckyorn' (which literally 
> means "check yes or no").  I use ckyorn in a Solaris shell script to
> pose 
> questions for my application's installation shell script.  I'm not a 
> shell guru, so ckyorn has been very helpful with command line 
> interactions during installs.  What's the best way to interact within a 
> Linux shell?  
> 
> For example, my installer has to ask boolean and text input questions 
> like:
> 
> 	Do you accept the license agreement?  [yes|no]
> 	
> 	Enter the name of your location: [Boston, MA]
> -
> Subcription/unsubscription/info requests: send e-mail with
> "subscribe", "unsubscribe", or "info" on the first line of the
> message body to discuss-request at blu.org (Subject line is ignored).


Jerry Feldman <gaf at blu.org>
Associate Director
Boston Linux and Unix user group
http://www.blu.org
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).



More information about the Discuss mailing list