summaryrefslogtreecommitdiff
path: root/example/read1char
diff options
context:
space:
mode:
Diffstat (limited to 'example/read1char')
-rw-r--r--example/read1char13
1 files changed, 13 insertions, 0 deletions
diff --git a/example/read1char b/example/read1char
new file mode 100644
index 0000000..43a3df8
--- /dev/null
+++ b/example/read1char
@@ -0,0 +1,13 @@
+#!/bin/sh
+# -*- tcl -*-
+# The next line is executed by /bin/sh, but not tcl \
+exec tclsh "$0" ${1+"$@"}
+
+package require Expect
+
+# read a single character
+# Author: Don Libes, NIST
+
+stty raw
+expect ?
+send_user $expect_out(buffer)