Re: Using pathnames with special characters
Re: Using pathnames with special characters
- Subject: Re: Using pathnames with special characters
- From: Chris Ridd <email@hidden>
- Date: Thu, 02 May 2002 09:25:37 +0100
Cryx <email@hidden> wrote:
>
On Wednesday, May 1, 2002, at 05:03 AM, Chris Ridd wrote:
>
> If you're using system() then the passed string is interpreted by sh,
>
> and
>
> so you need to look at sh's quoting rules. (Hint: replace \ with \\,
>
> replace " with \" and surround each argument with " characters.)
>
>
That's very bad advice, as $'s will still interpolate. If you are ever
>
tempted to call system or popen -- don't. Always avoid the shell and use
>
fork, exec family, and pipes instead.
Rats, forgot about $. Using single quotes would prevent that, but the
better advice is avoid shells getting involved at all. That way there's
nothing to accidentally forget :-)
>
The iTunes installer fiasco was the perfect example of the evils of using
>
shell for production work.
Cheers,
Chris
_______________________________________________
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.