On Wednesday, October 7, 2015 at 9:04:44 AM UTC-4, Matej Krejci wrote: > > Hello, > > I am trying to build a string and run it by standard function run(). > args=["arg1","arg2"] > jargs=join(args," ") > path="/grass_trunk/general/g.parser" > run(`$path $jargs`) >
Don't join the args. Just do run(`$path $args`). (Yichao suggested run(`ls $(args...)`), but this is unnecessary and somewhat redundant.) (Julia's run function does invoke the shell at all, so it doesn't uses spaces to separate arguments. Instead, it passes each argument as a separate string. This allows it to be robust for e.g. filenames containing spaces.)
