|
#1
|
|||
|
|||
Keep getting syntax error message from new MENUITEM
Good day.
I'm baffled as to why I keep getting a syntax error from this menu item I added to the menu file. Code:
MENUITEM "&Show IPv4 addresses (all VMs)" , "SEND" , "for i in {5,6} {8..9}; do echo ""; ssh -q -o "StrictHostKeyChecking no" 192.168.210.$i "uname -n;/usr/sbin/ip a| grep 'inet ' | grep -v host | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -v 255$";done\n" Please advise. Bjoern |
#2
|
|||
|
|||
Hi Bjoernh,
I'm so sorry that this reply is coming so late. I had a response all queued up last week and I must have forgotten to actually post the response. So, here it is: If you wish to include a special character such as a double quote ("), single quote ('), or backslash (\) in a command string, the octal code for the character should be used instead of the character. Here are the octal codes for those three characters:
Code:
MENUITEM "&Show IPv4 addresses (all VMs)" , "SEND" , "for i in {5,6} {8..9}; do echo \042\042; ssh -q -o \042StrictHostKeyChecking no\042 192.168.210.$i \042uname -n;/usr/sbin/ip a| grep \047inet \047 | grep -v host | grep -Eo \047[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\047 | grep -v 255$\042;done\n"
__________________
Thanks, --Cameron VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|