View Single Post
Old 10-18-2017, 12:50 PM
bgagnon bgagnon is offline
VanDyke Technical Support
Join Date: Oct 2008
Posts: 4,636
Hi Alexandre,

I am not sure I understand what you are trying to accomplish.

The problem with this script is that i need the script stop on first match e continuous to the next command.
I assume "-bash-3.2$" is the prompt that the remote sends after the command completes, so first match of what?

In general, you can exit early if your code lends itself well to being in a looping construct. Or it may be as simple as an If/Then statement:

If "string found" Then
' Do work
End If
Do you need to capture the results of the isearch command in a variable? If so, use ReadString(). And then parse that data looking for the match? If so, you can use a For/Next loop (and use InStr to detect the string) and Exit For once the match is found.

VanDyke Software
Technical Support
(505) 332-5730
Reply With Quote