I need to build a command as a string to pass to an external program (GMT), 
so I started to build it this way

    julia> ps   = "V:\example_23.ps";

    julia> name="Rome";

    julia> "pscoast -Rg -JH90/9i -Glightgreen -Sblue -A1000 -Dc -Bg30
            -B+t\"Distances from " * name * " to the World\" -K -Wthinnest 
> " * ps

    "pscoast -Rg -JH90/9i -Glightgreen -Sblue -A1000 -Dc -Bg30\n 
-B+t\"Distances from Rome to the World\" -K -Wthinnest > V:\example_23.ps"


Two things here. Shouldn't the \" show up as quote char in the string (that 
is , without the '\')?

But the second is worst. Why is it adding that '\n' (note it after the 
'-Bg30')?
Because of this spurious '\n' the call to the GMT program fails. It does 
work if I create the cmd string in a single line but I should not be forced 
to do so

Thanks

Joaquim 


Reply via email to