Re: Pipes and Shell Commands
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.