When running commands like:
\immediate\write18{ls} in the command line, I can see the output in the command line directly in the terminal, which is practical for instance to get error messages. Unfortunately, this is not written in the .log file, so for instance in TexStudio, the log just prints:
runsystem(ls)...executed. Which is not really helpful for debugging. Is it possible to force LaTeX to print the output of \write18 directly in the log file? Ideally, I'd like a solution as OS-independent as possible as I need to implement it for a library.