• 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: "-exec ..." in NSTask ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "-exec ..." in NSTask ?


  • Subject: Re: "-exec ..." in NSTask ?
  • From: Zeno Crivelli <email@hidden>
  • Date: Fri, 13 Jun 2003 17:57:51 +0200

>> [theTask setLaunchPath:@"/usr/bin/find"];
>> [theTask setArguments:[NSArray
>> arrayWithObjects:
>> @"/Users/matt",
>> @"-name",
>> @"*.txt",
>> @"-exec",
>> @"rm",
>> @"-f",
>> @"{}",
>> @"\\;",
>> nil]];
>
> There shouldn't be any need to escape the semi-colon, given that you're not
> using a shell. Try @";" instead of @"\\;".

Yeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees !

You're a genius !!!!

That was exactly the problem! Used @";" instead of @"\\;" in the above code,
and now it works!

Thanks VERY much!

It's unbelievable: I spent 2 hours figuring out how to put a backslash into
an NSString...then I found out that NSLog is dumb and print out "\\\\" but
in reality the NSString is okay and it contains ONE "\" (using @"\\")....and
now the backslash is NOT even necessary....


:-)
_______________________________________________
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.

References: 
 >RE: "-exec ..." in NSTask ? (From: Michael Kelly <email@hidden>)

  • Prev by Date: newbie wants advice on WWDC please
  • Next by Date: Re: Thread question (volatile needed?)
  • Previous by thread: RE: "-exec ..." in NSTask ?
  • Next by thread: newbie wants advice on WWDC please
  • Index(es):
    • Date
    • Thread