Posted to tcl by Bradipo at Mon Nov 14 17:38:56 GMT 2016view raw
- $ expect
- expect1.1> spawn ed /tmp/output.txt
- spawn ed /tmp/output.txt
- 6187
- expect1.2> expect "\r\n"
- /tmp/output.txt: No such file or directory
- expect1.3> send "a\r"
- expect1.4> expect "\r\n"
- a
- expect1.5> send "\"foo\""
- expect1.6> send "\r"
- expect1.7> expect "\r\n"
- "foo"
- expect1.8> send ".\r"
- expect1.9> expect "\r\n"
- .
- expect1.10> send "w\r"
- expect1.11> expect "\r\n"
- w
- 6
- expect1.12> send "q\r"
- expect1.13> expect EOF
- q
- expect1.14> exit
- $ cat /tmp/output.txt
- "foo"