Simple image host.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

1234567891011121314151617181920
  1. #!/bin/bash
  2. while true; do
  3. # Read, ignoring escapes, until the first bell char if
  4. # no bell is received in 10 seconds, the script loops
  5. read -r -d $(printf "\007") -t 10;
  6. code=$?
  7. # If the code is a timeout error, continue
  8. if [[ $code > 128 ]]; then
  9. continue
  10. # If read returned eof, suicide
  11. elif [[ $code != 0 ]]; then
  12. exit 0
  13. fi
  14. # If read returned success, run user's command
  15. $1
  16. done;