monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Send/expect strings


From: Jonathan Dance
Subject: Send/expect strings
Date: Wed, 25 Oct 2006 16:23:21 -0400

Hello,
First, the docs mention this:

 [{SEND|EXPECT} "string"]+

I was wondering what the behavior of multiple "send" commands are,
e.g., can I do:

 send "hello world\r\n"
 send "what's up\r\n"

Then do:

 expect "Everything is great!\r\n"

In other words, does multiple send statements effectively mean
concatenation? The reason I am wondering is I am looking to send a lot
of non-printable chars and putting it in one string makes my config
file unreadable.

Second... I was wondering about non-printable characters in the
"expect" string. I am presuming it will be handles as a regular
expression (it is not completely clear what causes regex vs not-regex
mode) but, for instance, this is a possible expect statement:

 expect "^\x00"

Does this work or should I be using a different method to match
non-printable characters? I've read through a bunch of POSIX regex
docs and I can't find much about non-printable characters.

Thanks in advance,

JD




reply via email to

[Prev in Thread] Current Thread [Next in Thread]