On Mon, Aug 21, 2023 at 05:24:51PM +0700, Budi wrote:
> How can Bash echo line start from previous line above created by a
> simple echo i.e. not echo -n
Use printf instead.
printf 'foo: '
sleep 3
echo 'done'
Once you've already *written* a newline to the terminal, it's too late.
You can't take it back. So you need to *avoid* sending the newline
in the first place. You do that by using printf, which is the sensible
replacement for the obsolete and glitchy "echo -n".