I need to trigger a shell script to run from inside a php function in a module. I an not sure if I need to use exec() or shell_exec() for this? It is not clear which one is what I want to use.
shell_exec — Execute command via shell and return the complete output as a string
exec — Execute an external program