From mboxrd@z Thu Jan 1 00:00:00 1970 From: brian powell Subject: [OT] Babel user queries like SH "read CONFIRM" Date: Wed, 8 Feb 2012 11:20:43 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d0442886604d5e904b8764735 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:34283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvAGL-0006sf-F3 for emacs-orgmode@gnu.org; Wed, 08 Feb 2012 11:20:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvAGD-0002LF-B9 for emacs-orgmode@gnu.org; Wed, 08 Feb 2012 11:20:53 -0500 Received: from mail-wi0-f169.google.com ([209.85.212.169]:64014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvAGC-0002L5-St for emacs-orgmode@gnu.org; Wed, 08 Feb 2012 11:20:45 -0500 Received: by wibhj13 with SMTP id hj13so666714wib.0 for ; Wed, 08 Feb 2012 08:20:44 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --f46d0442886604d5e904b8764735 Content-Type: text/plain; charset=ISO-8859-1 * Is there a simple way in BABEL to interact/query a user--something like this won't work: #+begin_src sh cat blah-install.sh echo -n " Sure you want to run this install script code to install BlahSoftware? (y/n): " read CONFIRM case $CONFIRM in y|Y) sh blah-software-install.sh;; n|N) echo " ERROR 5: User declined the agreement. " exit ;; *) echo " That is not vaild input and/or user declined to run install script. " esac #+end_src --f46d0442886604d5e904b8764735 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
* Is there a simple way in BABEL to interact/query a user--something l= ike this won't work:

#+begin_src sh
= cat blah-install.sh
echo -n " Sure you want to run this inst= all script code to install BlahSoftware? (y/n): "
read CONFIRM
=A0=A0case $CONFIRM in
=A0=A0 =A0y|Y)= sh blah-software-install.sh;;
=A0=A0 =A0n|N)
=A0=A0 = =A0 =A0echo "
ERROR 5: User declined the agreement.
"
=A0=A0 =A0 =A0exit
=A0=A0 =A0 =A0;;
=A0=A0 =A0*) echo "
That is not vaild input and/or user declined t= o run install script.
"
=A0=A0esac
#+end_src

--f46d0442886604d5e904b8764735--