Is there a way you can make the displayed content disappear just after user gives input ?
For example, take this file below
#!/bin/bash read -n 1 -p 'how are you ? ' var if [ "$var" == "y" ] then echo 'Have fun' else echo 'Go to Doctor' fi
If you run this, the output is
how are you ? yHave fun
I am looking for something that let me make
how are you ? disappear as soon as user presses a key
And then after disappearing, print
So, I want the last output of the above program to be only
Note: Also, anything above this script that is printed on the shell screen should not be erased.
I am using