By popular demand, a dedicated script:
I created bash alias 'nt' for this and no longer bother using a serial terminal.
This allows using bash history to recall commands.
Of course, the same could be done for Windows cmd.exe using a one line batch file..
$ nt trace
0 LOGMAG CH0 15.000000000 7.000000000
1 SMITH CH0 1.000000000 0.000000000
2 POLAR CH1 0.100000001 0.000000000
3 LINEAR CH1 0.200000002 0.000000000
$ nt "recall 2"
$ nt trace
0 LOGMAG CH0 15.000000000 7.000000000
1 SMITH CH0 1.000000000 0.000000000
$ nt sweep
666000 8660000 101
$ nt "recall 3"
$ nt sweep
9800000 114000000 101