Skip to content

Instantly share code, notes, and snippets.

Created March 2, 2012 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1961359 to your computer and use it in GitHub Desktop.
Save anonymous/1961359 to your computer and use it in GitHub Desktop.
A script to allow Pyxis to record from cron
#!/usr/bin/expect -f
#USAGE: [script name] ["station name"] [# of seconds to record (accepts float)]
set force_conservative 0
set timeout -1
match_max 100000
spawn $env(SHELL)
set station [lindex $argv 0]
set record_length [lindex $argv 1]
send -- "pyxis -r \"$station\"\r"
sleep $record_length
send -- ""
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment