How to run executable in Xcode with piped input? For example:
echo "abc" | myexec
I know I can set arguments to my executable in the Executable [name] Info > Arguments tab, but there seems to be no option to prefix it or something.
I see "Use Pipe for standard input/output" in the General tab, bu开发者_如何转开发t how to work with it? Doesn't seem to change a thing.
I'm using Xcode 3.2.6.
I don't know if this is the most elegant way, but could you have a Shell Script build phase that shunts the output of the first command into a file (echo "abc" > tempfile
) and then call your executable with (myexec < tempfile
)?
I haven't found much online yet besides this now-broken link that explains the use of "Use Pipe for standard input/output".
精彩评论