Re: "-exec ..." in NSTask ?
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.