Advertisement
Guest User

andyzweb

a guest
Nov 28th, 2009
691
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.38 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. FILENAME="output"
  4. TIMEOUTMINS=60
  5.  
  6. # Set filename
  7. if [ "$1" ]
  8. then
  9.     FILENAME="$1"
  10. fi
  11.  
  12. # Set timeout time in minutes
  13. if [ "$2" ]
  14. then
  15.     TIMEOUTMINS="$2"
  16. fi
  17.  
  18. # Kill all child processes (odtvrecord and curl)
  19. trap 'exit 0' HUP
  20. trap 'kill -s HUP 0' exit SIGINT SIGKILL
  21.  
  22. # Start recording
  23. odtvrecord $FILENAME &
  24. sleep $(($TIMEOUTMINS*60))
  25. fprint "\n"
  26. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement