Page 1 of 1

Variable followed by single quote?

Posted: Thu Aug 15, 2013 6:41 am
by x942
I am trying to create an app the calls adb.exe and runs a special command but I am having issues here:

Code: Select all

 "adb shell su -c 'vdc cryptfs pde wipe" && decoyVariable && HiddenVariable & ' 
This doesn't work because of the last single quote. How do I get that quote added to the end of the line after both variables? That single quote is needed adb shell tries to execute each word after -c as a separative command. In C# I would do

Code: Select all

 var encrypt = Proccess.Start("cmd","adb shell su -c 'vdc cryptfs pde wipe" +decoyVariable + HiddenVariable + "'") 


where the last single quote is enclosed in double quotes. is that the same in LiveCode? Would I encase it in double quotes?

Many thanks,

x942

Re: Variable followed by single quote?

Posted: Thu Aug 15, 2013 7:53 am
by dave_probertGA6e24
Yes, or you can use the constant: Quote

Code: Select all

  adb shell su -c 'vdc cryptfs pde wipe" && decoyVariable && HiddenVariable & "'"
or
  adb shell su -c 'vdc cryptfs pde wipe" && decoyVariable && HiddenVariable & QUOTE
Dave

Re: Variable followed by single quote?

Posted: Thu Aug 15, 2013 8:12 am
by Simon
Maybe I can learn something here:
...wipe"...
What does a single double quote do?

Simon

Re: Variable followed by single quote?

Posted: Thu Aug 15, 2013 7:45 pm
by x942
Simon wrote:Maybe I can learn something here:
...wipe"...
What does a single double quote do?

Simon
Typo There is also a double quote in the front.

Thanks for the answer! Everything works.

Re: Variable followed by single quote?

Posted: Thu Aug 15, 2013 7:51 pm
by x942
dave_probertGA6e24 wrote:Yes, or you can use the constant: Quote

Code: Select all

  adb shell su -c 'vdc cryptfs pde wipe" && decoyVariable && HiddenVariable & "'"
or
  adb shell su -c 'vdc cryptfs pde wipe" && decoyVariable && HiddenVariable & QUOTE
Dave
Perfect. I think I had used QUOTE with double & so it didn't work. It works now though :)