I am trying to write a script that will take time and process-name and pass them to at to schedule the job. I cannot send the EOT.
#! /usr/bin/expect # Usage: setupkill.exp time process. # press ctrl-D to finish the at command. set time [lindex $argv 0] set process [lindex $argv 1] spawn at $time expect "at>" send "/home/jagan/p/killprocess $process\r"; expect "at>" send "^D"; interact
This script aims to kill a specific process at a given time.