Technical article 109662

How to include a space between "send" fields in a chat script.

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5UnixWare 7.0.0

Written · Last revised

Problem

Some Internet Service Providers (ISPs) require a login chat
script to contain more than one "send" word.  For example, in the
Expect-Send sequence below, I need to send "ppp" and "username"
at the same time:
Expect  |   Send
--------|-------------------------------------
name:       username
word:       password
>           "ppp username" for PPP access or
            "slip username" for SLIP access
word:       password

(Or some variation of this -- every ISP has different requirements.)

Cause

Normally, a space in the Systems file chat script is considered a field delimiter, so you can't have a "send" sequence with a regular space character in it.

Solution

In SCO OpenServer, SCO UnixWare 2.x.x and SCO UnixWare 7, you
can send a space character with the "\s" sequence.  So, for the
example above, you could use a /usr/lib/uucp/Systems file entry
that included:
> ppp\s0.0.0.0

The "\s" string is the escape code for a space.

If you are using PPP from Morning Star on SCO OpenServer or SCO
UnixWare, you can simply enclose the "send" string in
double-quotes. So, for the example above, you could use a                        /usr/lib/mstppp/Systems file entry that included:
> "ppp 0.0.0.0"

See also

For SCO OpenServer, see the Systems(F) manual page. For SCO UnixWare 2.x, see the Systems(4) manual page. For SCO UnixWare 7, see the Systems(4bnu) manual page. For PPP from Morning Star, see the ppp.Systems(MST_PPP) manual page.

From the Xinuos technical article database, record 109662. Reproduced with permission. The original is at www.sco.com/ta/109662, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.