Continue output on same line
use the more portable printf
:
printf "%s" "$0: Starting backup process in '$backupdir'... "
sleep 3
printf '[OK]\n'
Use the -n
option to skip printing newline at the end. More reference at echo
docs.
So you could do something like this:
echo -n "$0: Starting backup process in '$backupdir'... "
echo -n hello