pv -qlL 2 | telnet …
or maybe better rlwrap sh -c 'pv -qlL 2 | telnet …'
with bracketed paste enabled. The problem is telnet
is now reading from a pipe, not directly from the terminal; this may limit its functionality. Do you really need telnet
? (see this for context). How do you connect telnet
to the UART? Maybe you just need a raw connection like with socat STDIO /dev/ttyUSB0,b19200,raw
. If so, then rlwrap sh -c 'pv -qlL 2 | socat …'
will possibly work reasonably well. So, how is it?