Using BASH, is there a way to capture characters that on currently on the screen?

More specifically, I need to display a screen, with what is currently in a variable, and allow the user to cursor over the point in which he/she wants to change the value, and then save the entire new entry.


This is line1: This is the value This is line2: Another vale

opps made a spelling mistake after the values have already been accepted, I need to cursor up and change vale to value but save the entire "Another value" in the variable.

I am not actually using read statements but have a keypress detection so I can capture the escape sequence of any key pressed on the keyboard. I can detect that the user is pressing an arrow key OR pressing and releasing a mouse button, but I don't know how to capture the results of a partial overtype.

  • Read man screen – ajeh Apr 25 '18 at 15:53
  • Not much help, that is like asking a sed question and being told to read an entire UNIX manual without an index section which may or may not have an example of exactly what you are looking for. Using the screen utility may be the answer, but calling it and doing what I need is a bit complex. maybe a bit more guidance in what section I am looking for would help. I am an old mainframer used to using Dialog Management but I no longer have that luxury :-) – R. Rainbolt Apr 25 '18 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.