Skip to Content
Exploring Expect
book

Exploring Expect

by Don Libes
December 1994
Intermediate to advanced
606 pages
16h 7m
English
O'Reilly Media, Inc.
Content preview from Exploring Expect

Sending Nulls

In Chapter 6 (p. 153), I described how to detect a null character. A null can be sent by calling send with the -null flag. By default, one null is sent to the currently spawned process.

send -null

An optional integer may be used to send several nulls. For example, the following command sends three nulls.

send -null 3

send uses the pattern "-null" while expect uses "null“. The absence of a hyphen is historical—all of the special patterns lack a hyphen.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

AI Agents in Action

AI Agents in Action

Micheal Lanham
Learning Go

Learning Go

Jon Bodner

Publisher Resources

ISBN: 9781565920903Supplemental ContentErrata Page