Posted By

2mf on 11/07/12


Tagged

fun clock


Versions (?)

Cuckoo-clock


 / Published in: Bash
 

URL: http://bash.im

Cuckoo-clock in bash. Simple as it says. Original idea from bash.org.ru.

  1. #!/bin/bash
  2.  
  3. KUKU=`/bin/date +%I`
  4. DEVICE=/dev/dsp
  5. FILE=/home/kolo/kuku.wav
  6.  
  7. while [ $KUKU -gt 0 ]; do
  8. cat $FILE > $DEVICE
  9. sleep 1
  10. KUKU=$((KUKU-1))
  11. done

Report this snippet  

You need to login to post a comment.