How to remove previous lines on bash?
I want to have a selector in a “case” menu, so I show the options:
<span style="color:#323232;"> 1) option A
</span><span style="color:#323232;"> 2) option B
</span><span style="color:#323232;"> 3) option C
</span>
Then read the choice (let’s say it’s B), remove the previous menu and show this instead:
<span style="color:#323232;"> 1) option A
</span><span style="color:#323232;"> » 2) option B
</span><span style="color:#323232;"> 3) option C
</span>
How can I do this? I know we can remove the current line with echo -ne “r”
, but I have no idea of how to do it with several
Add comment