Double quote string within a string sense talk

HI All,

I need help in composing the double quote string with in another string.
I am trying to invoke some basic adb commands from eggplant functional. 

1st Command:
My command  : "shell svc wifi disable"  - This is the command for wifi on/off, which has  single string enclosed in double quotes

shell "c:\windows\system32\cmd.exe", <</c "C:\Program Files\Eggplant\Eggplant.app\Resources\1.0.32\adb" >> && " shell svc wifi disable" && "> adbexperiment.txt"     - This works fine with no issues

2nd Command :
My command :
"shell am start -n com.test.automate/.IperfActivity -e iperf-name iperf2 -e iperf-args
"-s -i1"
 "  
This command will invoke an application in the phone which internally trigger iperf

shell "c:\windows\system32\cmd.exe", <</c "C:\Program Files\Eggplant\Eggplant.app\Resources\1.0.32\adb" >> && " shell am start -n com.anite.automate/.IperfActivity -e iperf-name iperf2 -e iperf-args "quote "-s -i1" & quote > adbexperiement.txt     - This is not working

Here in this, a double quote string is within the main string, how can we compose this in sensetalk, I seriously want this to work since i am very new to sensetalk scripting.

Help highly appreciated.

Thank you.

Comments

  • Hi,

    Can someone reply on the above?
  • MartinBrMartinBr Member
    edited January 14
    If you're having trouble with quoting, try putting your command into a variable and then printing it to see what it looks like.

    I think the following will do what you want:

    shell "c:\windows\system32\cmd.exe",
    <</c "C:\Program Files\Eggplant\Eggplant.app\Resources\1.0.32\adb" >> && \
    << shell am start -n com.anite.automate/.IperfActivity -e iperf-name iperf2 -e iperf-args "-s -i1"  > adbexperiement.txt >>

Sign In or Register to comment.