<p><pre><code> rc = libcox_exec_fmt(pHandle,&pResult,"ls '%s'",zDir); /*Don't forget the single quotes around 'zDir' */
</code></pre>
This is either insecure, or so different from a shell as to make it not worth using shell syntax.<p>I really like the concept though. Took me to figure out what the concept is because "system calls" doesn't mean "shell commands" to me, but having figured that out, operating on shell commands has a lot of things going for it.