• 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: Pipes and Shell Commands
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pipes and Shell Commands


  • Subject: Re: Pipes and Shell Commands
  • From: Brian Ling <email@hidden>
  • Date: Thu, 22 Aug 2002 05:33:58 -0700 (PDT)

That worked using NSUTF8StringEncoding.

Cheers

Brian


--- John Anderson <email@hidden> wrote:
> You'll want to create an NSData object with the
> contents of the string.
> You can do that like this:
>
> [theString dataUsingEncoding:NSASCIIStringEncoding
> allowLossyConversion:YES];
>
> John Anderson
>
>
> On Wednesday, August 21, 2002, at 02:45 AM, Brian
> Ling wrote:
>
> > Hi
> >
> > I have a some code that starts a shell script and
> > receives the output from the script, however what
> I
> > need to be able to do is send the script the
> contents
> > of an NSSting, I don't want to do this using
> [NSTask
> > setArguments:] for security reasons.
> >
> > I have seen some code that pipes data from one
> shell
> > command to another, however the data is generated
> by
> > the first command.
> >
> > So how can I pipe the NSString to the command, as
> > NSFileHandle only has a writeData method that
> takes an
> > NSData type as an argument.
> >
> > Any info or pointers would be most welcome.
> >
> > Brian
> > HotJobs - Search Thousands of New Jobs
> > http://www.hotjobs.com
> > _______________________________________________
> > 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.
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
_______________________________________________
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.

  • Prev by Date: Re: Bundle loading
  • Next by Date: Re: Bundle loading
  • Previous by thread: Re: Pipes and Shell Commands
  • Next by thread: NSDateFormatter
  • Index(es):
    • Date
    • Thread