I have a PHP CLI script and want to execute an interactive bash command (e.g. less huge-file.txt) from that script and get the same view (with less e.g. the navigation controls) as if I had started it directly from the terminal.
The normal system() call is not enough because they don't pause and just return all the output at once (in the case of e.g. less).
Sense is that I have a CLI script that organises several tasks. Some of them use complex bash commands and I just want to invoke the bash scripts from PHP but get the original terminal behaviour.