coi,

On Fri, Feb 12, 2010 at 7:51 PM, Ralph Versteegen <teeem...@gmail.com> wrote:
>> Basically, anything that could have a space in it needs quotes. The only 
>> potential edge case might be if it contains a caret (^), which is the shell 
>> escape character (and, is not allowed in file names, I believe).
>>
>> --
>> Mike Caron
>
> Doesn't work. The correct way is
>
> system("\"\"path to exe\" flags -o \"path to output file\" \"path to
> input file\"\"")

You'll have to IFDEF that.. on Linux it interprets that as :

 run the binary named "/some/path/to/binary flags -o outputpath inputpath"
 with no parameters.

Which unsurprisingly does not exist.

Also, on Linux, quotes are legal in file/directory names.
try

$ echo foo > /tmp/\"foo\"
$ mkdir /tmp/\"oof\"
$ ls /tmp/*"*

/tmp/"foo" /tmp/"oof"

quoting's never as easy as it looks. You may be able to get away with
ignoring quotes in filenames though (because after all, 75% of
software handles shell-significant characters like []&*<>\; in
filenames badly. : seems to be handled okay. At least / and (NULL ie
character code #0) are not possible to have in filenames :)
_______________________________________________
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to