• 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
Piping shell scripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Piping shell scripts


  • Subject: Piping shell scripts
  • From: Andrew Merenbach <email@hidden>
  • Date: Sun, 14 Jul 2002 23:09:09 -0700

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?

(BTW, I can definitely divide seven by three in the code itself; rather, this program will allow the division equation to be changed by the user.)

Take care,
Andrew Merenbach
_______________________________________________
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.

  • Follow-Ups:
    • Re: Piping shell scripts
      • From: Cameron Hayne <email@hidden>
  • Prev by Date: Problems with custom Cell in NSTableView
  • Next by Date: NSKeyValueCoding ?
  • Previous by thread: Re: Problems with custom Cell in NSTableView
  • Next by thread: Re: Piping shell scripts
  • Index(es):
    • Date
    • Thread