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_at_dbf.ddb.de
LEBBE GEHT WEIDER
**********************************************************************
Received on Wed Nov 27 1996 - 09:58:39 NZDT