I would like to give input set of lines from command line and store it in a variable, which can be used later for parsing. With below command, I am able to do. However, I am unable to edit the line(given as input) like selecting "Backspace" key. If I use -e to the read command, I can edit the line but unable to go to next line (when I click on "Enter" key ). Basically ( $'\e' ) is the "Esc" key, where it will help to come out of the read (input line).
read -r -d $'\e' var
Can someone help here. How to edit input of lines from command line in interactive way.
Thanks