Xshell Forum

Quotation marks in xsh.Screen.Send

Last post: Friday, March 25, 2016 6:58 AM by zoo, 1 reply

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

Quotation marks in xsh.Screen.Send

 
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
Friday, March 25, 2016 6:58 AM - zoo

Re: Quotation marks in xsh.Screen.Send

 
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)&"...")