Hi community,
It is known that one can execute shell commands via Lua's native os.execute, or io.open.
I am willing to get the output of a specific command. This command is supposed to return an output, but can also fairly err, depending on the user configuration.
The thing is, when we actually input a wrong command in a shell output, it prints an an error message readily, while still running the Lua program. Well, is it possible to somehow shadow that error message ? Catching the output, redirecting it somewhere else, and then display (or not) a custom-made report instead ? If so, can I have some pointers, in terms of code ?
As I am horrible at stating things in simple and few words (I do admire native english-speaking people conciseness), I can come up with an example, if needed.
Best regards,
Roland Y.