Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-11-2018, 08:32 AM
BjoernH BjoernH is offline
Registered User
 
Join Date: Mar 2018
Posts: 26
Asking for advice on "Error: Expected end of statement"

Good day.

I need some advice on this "Expected end of statement" error. The following crt.Screen.Send results in a compilation error:

Code:
vKeyw = InputBox("Enter the vNF name, ie. cscf5001, aicsf5001, dpa2bscas, etc: ")
	If vKeyw = ""  Then Exit Sub
	
	crt.Screen.Send"nova list|grep " & vKeyw "| awk -F '|' '{print $3,$4,$6,$7}'" & vbCr
'	crt.Screen.Send"nova list|grep " & vKeyw & vbCr
	crt.Screen.WaitForString"~]$"
The first part works, it's the awk portion that does not.

Thanks in advance,
Bjoern
Reply With Quote
  #2  
Old 07-11-2018, 08:47 AM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 546
Hi BjoernH,

It looks like the issue is on the following line:

Code:
crt.Screen.Send"nova list|grep " & vKeyw "| awk -F '|' '{print $3,$4,$6,$7}'" & vbCr
Between the vKeyW variable and the next quoted session you are missing a &.

Code:
crt.Screen.Send"nova list|grep " & vKeyw & "| awk -F '|' '{print $3,$4,$6,$7}'" & vbCr
Does adding the & allow you to run the script?
__________________
Thanks,
--Eric

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 07-11-2018, 10:25 AM
BjoernH BjoernH is offline
Registered User
 
Join Date: Mar 2018
Posts: 26
Oh snap! Thank you Eric, it needed the ampersand.


Regards,
Bjoern
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 08:22 AM.