I think you want delete, rather than erase, so use tput dch1 or tput dch 1. Erase simply replaces the character(s) with blank(s), whereas delete removes the character(s), shifting those to the right, to the left.
E.g.: (row=3; sleep=2; cols=$(tput cols) && tput clear && (while [ $row -gt 0 ]; do echo; row=$((row - 1)); done) && d=32 && e=$(($d + $cols - 2)) && while [ $d -le 126 ]; do [ $d -le $e ] || break; echo -ne "$(printf '\%04o' $d)"; d=$((d + 1)); done && sleep $sleep && tput cup $row 0 && sleep $sleep; tput dch1; sleep $sleep; echo) Note however, if (long) line was wrapped by terminal rather than by newline, depending on terminal/emulation, it might possibly also alter subsequent displayed line(s). Read The Fine Manual (RTFM) https://manpages.debian.org/stable/ncurses-bin/terminfo.5.en.html On Sat, Jun 28, 2025 at 3:29 PM Eben King <e...@gmx.us> wrote: > > A while back I wrote a script to take the output of dd and make a graph > of the transfer rate. It worked, but since it scrolls up I wasn't happy > with it. > > In a bash script, I'm trying to use tput commands to delete column 1 > (tput cup $row 1 && tput el1), scoot the rest of the line left, then > draw along the right edge (echo -n). Step 2 is proving problematic, as > in I don't know how to do it. Is there another way? Thanks.