Re: NSTask is Weird
Re: NSTask is Weird
- Subject: Re: NSTask is Weird
- From: "Michael Ash" <email@hidden>
- Date: Thu, 11 Sep 2008 11:18:01 -0400
On Thu, Sep 11, 2008 at 7:03 AM, J. Todd Slack
<email@hidden> wrote:
> Hi,
>
> I guess what I dont get is when you pass arguments that are not simple like:
>
>> [task setLaunchPath: @"/bin/ls"];
>> [task setArguments: [NSArray arrayWithObjects: @"ls", @"-al", @"/",
>> nil]];
>
> What about a command that takes arguments like:
>
> --segments /Users/slack/music/iTunes/iTunes Music/amber,00:00:10,00:00:35
> /user/slack/music/itunes/itunes music/01 amber.mp3
>
> Where:
>
> ' --segments' is an argument
>
> '/Users/slack/music/iTunes/iTunes Music/amber,00:00:10,00:00:35' is really
> one argument I build up from pieces and has spaces in path
>
> '/user/slack/music/itunes/itunes music/01 amber.mp3' is another argument
> with spaces in path, etc
See:
http://www.cocoadev.com/index.pl?NSTaskArguments
Summary: spaces don't matter. All "special characters" are due to
parsing by the shell, and you are no longer using a shell.
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden