Forum Discussion

NicZU's avatar
NicZU
Icon for New Contributor rankNew Contributor
5 years ago

quartus_sh not preserving arguments

Hi everyone,

I am trying to pass a JSON string to a tcl script interpreted by quartus_sh so I call:

> quartus_sh -t myscript.tcl -json {{"id":310741,"iid":350,"project_id":75039,"title":"Random Title","description":"Random Description"}}

Inside myscript.tcl I retrieve the args through quartus(args) but it looks like they have been modified. All quotes disappear and parentheses are preceded by a backslash. Indeed if I print them I get:

> puts $quartus(args)

-json \{\{id:310741,iid:350,project_id:75039,title:Random Title,description:Random Description\}\}

It looks to me this is some kind of regexp....

Is there a way to get the original string without any modification?

Thanks!

2 Replies

  • SyafieqS's avatar
    SyafieqS
    Icon for Super Contributor rankSuper Contributor

    Hi Nicolo,


    As a workaround, have you try on latest Quartus to see if this issue resolve? If it persist I guess you will have to modify it manually.


    • NicZU's avatar
      NicZU
      Icon for New Contributor rankNew Contributor

      Hello,

      thank you for the reply . Sadly I have to support also older Quartus versions (19.1 and later).

      I did not find an easy workaround in quartus_sh so I decided to parse the arguments in bash and then pass the "digested" information to my tcl script.

      Thanks,
      Nicolò