home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / expect / scripts / noidle < prev    next >
Encoding:
Text File  |  1993-02-21  |  485 b   |  16 lines

  1. #!../expect -f
  2. #Name: noidle
  3. #Description: expect script to run a shell which avoids being "autologged out"
  4. #        by sending a <space><delete> every hour if no other I/O has occurred.
  5. #Author: Don Libes, December 30, 1991
  6.  
  7. set timeout 3600
  8. log_user 0
  9. system stty -echo raw
  10. spawn $env(SHELL)
  11. expect    {
  12.     timeout {send "abc \177d"; continue -expect}
  13.     -re .+ {send_user -raw $expect_out(buffer); continue -expect}
  14.     -i $user_spawn_id -re .+ {send $expect_out(buffer); continue -expect}
  15. }
  16.