Although the original does no logging, I dared to propose that this might be useful for non-trivial calls. As might be a redirection duplication of stderr and/or stdout to some location where you can inspect it. Or show it depending on a verbosity option.
And yes, all of this is unnecessary in perfect code.
| [reply] |
Sure, but that still doesn't explain why it's better to do your own implementation of backticks right from the start. Given my trivial implementation of your wished extra layer of indirection, gives you all the hooks you want to add logging, redirection, or whatever you may wish to do. But unless there's an actual reason to do the logging, redirection, or whatever, there's no need to do it.
| [reply] |