Eelco Van Vliet:
 |Hi everybody
 |
 |I use the -scriptcmd command line option quit a lot.
 |I noticed that it is not possible to pass array value to a macro
...
 |dx -script test.net -scriptcmd 'test(value=[10,10]);'
 |gives:
 |set: No match.
...
 |Or is it a bug in the scriptcmd passing  ?

Yep, sure is.  The problem exists for all DX arguments.  Look in
$PREFIX/dx/bin/dxworker and you'll notice:

  ...
  set arglist=($dxargs $envargs $argv)
  ...
  case -scriptcmd:    # execute this command, possibly after importing a script
    ...
    set ScriptCmd=$arglist[2]
  ...

Putting quotes around the last $arglist[2] is easy.  But the big problem
lies in the original arglist setting.  This presumes there are no special
characters or metacharacters in any of the command-line arguments.

This needs replaced with something that splits dxargs and envargs into
words, but keeps the list elements of argv intact, and tacks it all into
one big list.  Something like "$@" in Bourne shell would work, but I don't
know how to do this in csh.

Any csh gurus out there?

Randy

Reply via email to