• 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: Executing a perl script from cocoa - ObjC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Executing a perl script from cocoa - ObjC


  • Subject: Re: Executing a perl script from cocoa - ObjC
  • From: Bjoern Kriews <email@hidden>
  • Date: Fri, 20 Feb 2004 14:01:17 +0100

On 20.02.2004, at 12:12, Ramakrishna Kondapalli wrote:

I want to execute a Perl script (For Ex. ./Users/usr1/per1.sh
<file_name>) from my cocoa - ObjC code and put the output in a file. How
can I do this?

Thanks & Regards,

simplest way (works in every C program):

#include <stdlib.h>
system("any shell command here > somefile");

For a more Cocoaish solution, take a look at NSTask,
there are various examples on the net, one by Apple,
called Moriarity if I recall correctly,
cocoadevcentral.com has something about it and
the book "Cocoa Programming" explains it pretty well.

Regards, Bjoern
_______________________________________________
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: Executing a perl script from cocoa - ObjC
      • From: Daryn <email@hidden>
References: 
 >Executing a perl script from cocoa - ObjC (From: "Ramakrishna Kondapalli" <email@hidden>)

  • Prev by Date: Re: Priotiry
  • Next by Date: Re: Executing a perl script from cocoa - ObjC
  • Previous by thread: Executing a perl script from cocoa - ObjC
  • Next by thread: Re: Executing a perl script from cocoa - ObjC
  • Index(es):
    • Date
    • Thread