What is the advantage of using open FP, "find . -ls |" and then looping through the handle, as opposed to using backticks?
Once you found what you are looking for, you can discard the rest.
If you capture the pid returned by the piped open, you can even kill the external process before it completes.
regarding system(), it returns the exact same thing as using backticks
What makes you think this? system does not capture or return any output from the program.
why did the coder use a pipe in open() instead of using backticks ...?
Perhaps he was dealing with very large directories.
In reply to Re: Interacting with the shell ( backticks, system(), open -| )
by BrowserUk
in thread Interacting with the shell ( backticks, system(), open -| )
by jktstance
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |