On Fri, Nov 22, 2024 at 08:37:03 +0800, Bitfox wrote: > $ echo "upload tmp" |./filen > upload tmp > Error trying to prompt for user input: readline was closed. (maybe you're in > an environment without stdin, like a Docker container) > Error [ERR_USE_AFTER_CLOSE]: readline was closed
I would start by reading the documentation for this "filen" thing. Does it have any kind of batch or noninteractive mode? If it doesn't, and if the simple "write commands to stdin" didn't work (as shown above), then you're looking at Expect. David linked to one man page for it. There's a *lot* more out there. Here's a wiki page that has lots more links: <https://wiki.tcl-lang.org/page/Expect>