Blogs

Showing 7 results.
Items per Page 20
of 1

Forums

« Back to Technical Questions

IOSAPI commands with quotes

Combination View Flat View Tree View
Threads [ Previous | Next ]
Is there a proper way to send commands to the IOSAPI that contain quotes? I am using the java version of IOSAPI and receive an error of "operation failed" every time I send a command that has quotes. Is there some way that I am supposed to be escaping the quotes?

This presents a problem because my code will crash anytime it hits elements with spaces in the names.

Thanks for the help

Use backslash \ to ignore quotes

Edited by: Anurag Gurtu on Oct 16, 2008 2:57 PM

and, let us know if it doesn't work.

Edited by: Anurag Gurtu on Oct 16, 2008 2:59 PM

I take it that you mean that I should be sending it to the IOS API with backslashes so something like this (in java):

iosapi.exec("show something \\\"Name with space\\\");

That doesn't work. Neither does:

iosapi.exec("show something \"Name with space\");

I see only three quotes, I think there should be four (even number)

Sorry... My fault. I was just trying to type examples rather than copying from my source.

iosapi.exec("show something \\\"Name with space\\\"");

That doesn't work. Neither does:

iosapi.exec("show something \"Name with space\"");

The code compiles, but it can't run those commands.

If you can provide us with the real command you are trying to issue we can test it on our end and provide you with a solution.

Collateral


No files available