My bash-script looks as following:
echo \"Description:\" while [ $finishInput -eq 0 ]; do read tmp desc=\"$desc\"$\'\\n\'\"$tmp\" if [ -z \"$tmp\" ]; then fi
In your example you delete the text at the same line. When you want to return to the previous line use \e[1A, and to clear that line, use \e[K:
\e[1A
\e[K
echo 'Old line' echo -e '\e[1A\e[Knew line'
When you want to go N lines up, use \e[A
N
\e[A