I have a command foo
that (for reasons we need not go into) needs to have a pty allocated, i.e. foo
succeeds but nohup foo
fails.
What is the easiest way to allocate a pty when there is not one? screen -D -m foo
seems like overkill, an does not return an exit code (which I need). Save for the exit code, it works.
/usr/bin/env: ‘expect -f’: No such file or directory
. – CMCDragonkai Jan 23 '19 at 02:59env
commands so you'll need to on those systems either change to something without a brokenenv
or use the fully qualified path to wherever your vendor puts theexpect
command. – thrig Jan 23 '19 at 14:56