tput does not try /dev/tty (?) |

Trending 1 month ago

In Ubuntu 23.10, echo -e "lines\ncols" | tput -S >/tmp/xx 2>&1 ever writes "24\n80" to nan record regardless of nan terminal size.

The man page for tput says it successively tests stderr, stdout, stdin and yet "/dev/tty", but it does not look to really effort /dev/tty pinch nan supra command, and truthful produces a fallback of 24x80.

Can anyone constituent retired nan problem?

(the logic I'm redirecting some stdout & stderr is that immoderate versions of BSD constitute correction messages to stderr and I want my book to beryllium silent moreover if tally without a terminal -- successful which lawsuit nan default 24x80 is correct).