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 04-08-2019, 07:31 PM
justinpappy justinpappy is offline
Registered User
 
Join Date: Apr 2019
Posts: 1
Red face Script Help With Variables

Good evening,

I'm pretty new with VBScript in general and am still in a very learning phase. However, I can't seem to figure out a solution on my own and hoping this forum will help me with this.

I have a script that grabs my TTY then I want to search a file for a match.

In a snapshot Here is the part that I'm struggling with

Code:
crt.Screen.Send "/bin/echo ""`/usr/bin/who am i | awk '{ print $2 }'`QQ""" & chr(13)
				crt.Screen.WaitForString vbcr
				strTTY = crt.Screen.ReadString ("QQ")
				crt.Screen.Send ("/bin/cat /tmp/device.txt | grep -w /dev/" & strTTY)
The output that I'm getting is that my last Send statement is on two different lines and therefore won't match anything.

I hope that I've given enough detail and look forward to understanding more about this language.

Thank You
Reply With Quote
  #2  
Old 04-09-2019, 07:57 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,945
Hi justinpappy,
Quote:
The output that I'm getting is that my last Send statement is on two different lines and therefore won't match anything.
I'm not sure what you mean by the above. Are you saying there's a wrapping issue within the terminal window?

Please post a screenshot that illustrates the issue or send it to support@vandyke.com (reference "Forum Thread #13491").
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
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 02:37 PM.