Re: Xcode debug follow fork
Re: Xcode debug follow fork
- Subject: Re: Xcode debug follow fork
- From: Greg Guerin <email@hidden>
- Date: Fri, 14 Nov 2008 15:09:08 -0700
Dee Ayy wrote:
However, sometimes I invoke as follows:
cat my_pipe | ./my_app | tee my_log
Can you show me a stupid cat trick to do that with
./my_app <my_pipe
It's the same basic pattern I tried to illustrate.
Any shell pipeline that looks like this:
cat a_file | ./any_app
can be replaced by this:
./any_app <a_file
There are some situations where this replacement can result in a
subtle change, but in general this replacement will work.
The replacement won't work if you have 2 or more files, like this:
cat a_file b_file | ./any_app
but you didn't say that, so it doesn't apply.
So using the above pattern on this:
cat my_pipe | ./my_app | tee my_log
you get this:
./my_app <my_pipe | tee my_log
Or if you don't need the output from tee's stdout:
./my_app <my_pipe >my_log
This is all elementary I/O redirection and pipeline semantics. If
you don't undestand that, you should probably read the relevant
sections of the 'bash' man page, or an introductory text on Unix/
Posix. In particular, focus on standard input and standard output
streams, and the shell operators, < and >, used for redirecting them
to files.
-- GG
_______________________________________________
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