* Reading variables with BASH
@ 1996-11-27 9:45 Juergen Bock
0 siblings, 0 replies; only message in thread
From: Juergen Bock @ 1996-11-27 9:45 UTC (permalink / raw)
To: tru64-unix-managers
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
**********************************************************************
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1996-11-27 9:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-11-27 9:45 Reading variables with BASH Juergen Bock
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox