Hi Ryo, Russ, The following syntax would also work, enclosing the argument that
contains spaces in double quotes surrounded by single quotes. The
arguments which don't contain spaces can be in quotes or not. $ ferret -script tmp.jnl 'hello' '"a b c"' 'world' When Ferret gets the arguments, they are strings which do not
include surrounding quotes. So for the original example, $ /usr/local/ferret-7.3/bin/ferret_v7.3 -script tmp.jnl "hello" "a b c" "world" What comes to Ferret is these arguments as strings but without
any surrounding quotes. hello It uses these to in effect create the Ferret command go tmp.jnl hello a b c world For my example with the second argument given as '"a b c"', it
creates the command And the example with backslashes acts similarly. You'd think Ferret should just add quotes around the incoming
arguments as they're put into that command line that's being
created. I just fiddled with that a bit, but didn't get that to
work consistently. And of course that would interfere with any
quotes that the user has already sent in. For the example $ ferret -script tmp.jnl 'hello' '$3' 'world' Ferret is of course running go tmp.jnl hello $3 world where, interestingly enough, $3 is translated to argument 3 of
the script, "world". There does not seem to be a good way to
escape that text. On 12/19/2017 7:04 AM, Ryo Furue wrote:
|