• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Piping shell scripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Piping shell scripts (From: Andrew Merenbach <email@hidden>)

  • Prev by Date: PB and CVS
  • Next by Date: PBX alternative?
  • Previous by thread: Piping shell scripts
  • Next by thread: NSKeyValueCoding ?
  • Index(es):
    • Date
    • Thread