Quotation marks in xsh.Screen.Send [1]

Quotation marks in xsh.Screen.Send

Thursday, March 24, 2016 9:53 AM - Manuel

Hi,

I need to send the following command via xsh.Screen.Send in a script:

nvram get dhcp_staticlist | sed 's/</\n/g' | grep ":" | awk -F">" '{ print $2">"$1">"$3; }' | \

I get an error Line 1: Expected ')' presumably because it can't seem to deal with the quotation marks (grep ":" etc.) in the command. Is there any way to make this work?

Thanks,
Manuel

Program Ver. : Xshell 5


Re: Quotation marks in xsh.Screen.Send

Friday, March 25, 2016 6:58 AM - zoo

Try to use chr(34) instead of "(double quotation) like this:
34 means ASCII 34th character, ".
xsh.screen.send("nvram get dhcp_staticlist | sed 's/</\n/g' | grep "&chr(34)&":"&chr(34)&"...")


Previous views: 903