caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Sys.command and quotes
@ 2009-05-05  8:58 Matthieu Dubuget
  2009-05-05  9:37 ` [Caml-list] " Francois Pottier
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Matthieu Dubuget @ 2009-05-05  8:58 UTC (permalink / raw)
  To: caml-list

Hello,

I have a problem with mingw version of ocaml (compiled by hand, or with 
godi).

1- Is the following reproducible?

2- If yes, do you consider this as a bug?

It seems that in "Sys.command s", if the first and the last characters 
of s are '"', they are elided?

It prevents menhir (20090402) to compile on my mingw system with 
ocamlfind in use (because when
ocamlfind is used, the dependencies are found with an ocamlfind ocamldep 
call).

Thanks in advance


Objective Caml version 3.11.0

# let cmd = "echo";;
val cmd : string = "echo"
# let arg1 = "Hello world";;
val arg1 : string = "Hello world"
# let q = Filename.quote;;
val q : string -> string = <fun>
# let go c = Sys.command (String.concat " " c);;
val go : string list -> int = <fun>
# go [cmd;arg1];;
Hello world
- : int = 0
# go [q cmd; arg1];;
Hello world
- : int = 0
# go [cmd; q arg1];;
"Hello world"
- : int = 0
# go [q cmd; q arg1];;
'echo" "Hello' n'est pas reconnu en tant que commande interne
ou externe, un programme ex‚cutable ou un fichier de commandes.
- : int = 1








^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-05-05 19:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-05  8:58 Sys.command and quotes Matthieu Dubuget
2009-05-05  9:37 ` [Caml-list] " Francois Pottier
2009-05-05 19:59   ` Matthieu Dubuget
2009-05-05  9:44 ` Olivier Andrieu
2009-05-05  9:45 ` Sylvain Le Gall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).