Parameters with nested quotes


I am deploying a small desktop agent that requires a fairly long parameter with nested quotes that I am not sure how to code properly.


nessuscli agent link --key=XXXXXXXXXXXXXX --host=XXX.XXX.COM --port=XXX --groups=“XXXXX XXXXX”

Since the parameter contains spaces I would need to wrap the parameter in quotes


“nessuscli agent link --key=XXXXXXXXXXXXXX --host=XXX.XXX.COM --port=XXX --groups=“XXXXX XXXXX””

However, when running the script with the nested quotes, I get an error.

How does one code a parameter correctly with nested quotes?

Thank you.

Hi everyone!

I solved my nested quotes parameter issue by adding back ticks before and after the nested quotes.

The parameter should have read:

“nessuscli agent link --key=XXXXXXXXXXXXXX --host=XXX.XXX.COM --port=XXX --groups="XXXXX XXXXX”"

Thank you everyone. :slight_smile:

1 Like