From: "Juergen Bock" <FDV20_24 () dbf-s1 ! dbf ! ddb ! de>
To: tru64-unix-managers
Subject: Reading variables with BASH
Date: Wed, 27 Nov 1996 09:45:16 +0000 [thread overview]
Message-ID: <96076341621810.tru64-unix-managers.marc@archive.invalid> (raw)
Hi managers,
I have a few, not so Dunix-specific questions. Maybe somebody who uses
bash has run into the same problems.
Well, I set up a little menu for users. I wrote that as a bash shell
script. Everything works fine but there are a few things that might
improve the whole stuff:
-When there are choices for different submenues I read a variable with
the "read" command (something like "echoDo you want to continue ?
(Y/N);read CHOICE"). Users have to type a letter and then hit the
RETURN key. Question: Is there a way to read a variable without
hitting RETURN? I want to read one character and then evaluate the
variable immediately and continue with the next submenu.
-Is there a way to fill the buffer of a variable? This is useful for
editing variables. On screen should appear something like "The last
username you used was: JOHNDOEZ" and you should be able to edit this
variable directly (like removing the "Z" by typing backspace).
-To show a longer list I use "more". To avoid a shell escape from
"more" I defined SHELL=/bin/false. That seems to work. Are there any
other ways a user can get a shell prompt which I didn't think of?
Yeah, I know a C or Perl or whatsoever program would make that a lot
easier.
TIA
I will summarize
Juergen
**********************************************************************
Die Deutsche Bibliothek Juergen Bock
Zeppelinallee 4-8 069-7566-735
60325 Frankfurt bock@dbf.ddb.de
LEBBE GEHT WEIDER
**********************************************************************
reply other threads:[~1996-11-27 9:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox