Re: specifying the source of stdin (pipe / file)
Re: specifying the source of stdin (pipe / file)
- Subject: Re: specifying the source of stdin (pipe / file)
- From: Adam Richard <email@hidden>
- Date: Fri, 02 May 2008 13:26:07 -0300
I definitely want to run it from within Xcode, because I want to debug
it. And I want a file to somehow be redirected into my standard input.
Rick Sustek wrote:
Not clear on what you are after.
Do you mean you want to launch your utility from within Xcode and have
Xcode feed a command line to it?
or
Do you mean that you want to launch your utility on a shell command
line, and redirect a file into the stdin of your program?
like:
% cat fooFile | myUtil
or
% myUtil < fooFile
-Rick
Begin forwarded message:
From: Adam Richard <email@hidden>
Date: May 2, 2008 6:17:54 AM PDT
To: email@hidden
Subject: specifying the source of stdin (pipe / file)
I am trying to write a command-line application with XCode.
My application takes input from stdin. The way I normally use it is
to use redirection to specify the input file. For example:
[CODE]program < input.txt[/CODE]
In XCode, this is presumably specified by creating an executable and
editing its info, via Project -> Edit Active Executable "...".
But the dialog doesn't explain how to specify where input comes
from. Changing the arguments to include "< input.txt" doesn't work,
I guess because "<" is a symbol known to the Terminal, and XCode
probably bypasses the Terminal. Changing the option to "Use Pipe for
standard input/output" seems to have no effect - perhaps there's a
way to specify a pipe, but the dialog won't let me. Searching the
XCode User's Guide didn't explain it either - it mentions the "Use
Pipe" option, but doesn't describe how it works.
How can I get standard input from a file?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden