10989Re: "ocaml_beginners":: Command-line argument oddity
- Apr 1, 2009--- In email@example.com, Adrien <camaradetux@...> wrote:
>I already tried that. Doesn't help.
> What you're seeing is actually a feature of your shell that is called
> an at-response file.
> IIRC, when giving a filename preceded with @, it will try to use that
> file as a list of answers for your program. It should be roughly
> equivalent to unix's "<<".
> Using quotes around the argument could help this problem.
> Also, thisNo, it's OCaml's doing, although I am using the windoze shell.
> only exists in the windows shell afaik.
ruby -e "p ARGV" foo bar
ruby -e "p ARGV" foo @bar
Let's try a batch file named "test.bat".
.\test.bat foo bar
.\test.bat foo @bar
Let's try compiled FreeBasic.
.\command foo @bar
exe name= .\command
arg 1 = "foo"
arg 2 = "@bar"
> Adrien Nader
> On 31/03/2009, Bill James <w_a_x_man@...> wrote:
> > The program:
> > Array.iter print_endline Sys.argv
> > ocamlopt try.ml -o try.exe
> >>> try foo bar
> > try
> > foo
> > bar
> >>> try foo @bar
> > Cannot open file bar
> > ------------------------------------
> > Archives up to December 31, 2008 are also downloadable at
> > http://www.connettivo.net/cntprojects/ocaml_beginners/
> > The archives of the very official ocaml list (the seniors' one) can be found
> > at http://caml.inria.fr
> > Attachments are banned and you're asked to be polite, avoid flames
> > etc.Yahoo! Groups Links
- << Previous post in topic Next post in topic >>