Re: Piping shell scripts
Re: Piping shell scripts
- Subject: Re: Piping shell scripts
- From: Cameron Hayne <email@hidden>
- Date: Mon, 15 Jul 2002 10:56:46 -0400
On Monday, July 15, 2002, at 02:09 am, Andrew Merenbach wrote:
I would like to execute the following shell script:
echo 'scale=10;7/3'|bc
... which pipes the phrase in quotes to the calculator program bc.
Unfortunately, though, all I get is this:
'scale=10;7/3'|bc
as my result. Is it possible to do this with Objective-C?
I'm not sure what you have been trying so far, but you probably want to
look into using pipes to execute an external program (your shell script)
and get the output back as a string. Look at Apple's Moriarty example.
.... Cameron
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.