File: scriptdemo

package info (click to toggle)
minicom 2.2-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,220 kB
  • ctags: 1,151
  • sloc: ansic: 13,987; sh: 3,589; makefile: 130
file content (29 lines) | stat: -rw-r--r-- 655 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# A little demonstration of the possibilities of "runscript".
# This script can be executed by typing: "runscript scriptdemo".
#
# Adjust the stty's below to your system: BSD-like or SysV-like.
# Linux ofcourse accepts both :-)
#

  goto main
left:
  print "\010 \010\010*\c"
  return
right:
  print "\010 *\c"
  return
main:
# ! stty -echo cbreak
  ! stty -echo -icanon min 1
  verbose off
  print Demo! press 'q' to move left, 'w' to move right, 'ESC' to stop.
  print "                   *\c"
  expect {
  	"q"	gosub left
  	"w"	gosub right
  	"\033"	break
  }
  print \nEnd of demonstration.
# ! stty -cbreak echo
  ! stty icanon echo min 5
  sleep 1