From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96076341621810.tru64-unix-managers.marc@archive.invalid> From: "Juergen Bock" Date: Wed, 27 Nov 1996 09:45:16 +0000 To: tru64-unix-managers Subject: Reading variables with BASH X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96076341621810 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 **********************************************************************