bin: script to display a binary clock

This commit is contained in:
Guillaume Dott 2012-11-06 23:35:36 +01:00
parent 1599871ca9
commit dbd670107b

17
bin/binary_clock Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
for a in $(date +"%H%M%S"|cut -b1,2,3,4,5,6 --output-delimiter=" ")
do
case "$a" in
0) echo ". . . .";;
1) echo ". . . *";;
2) echo ". . * .";;
3) echo ". . * *";;
4) echo ". * . .";;
5) echo ". * . *";;
6) echo ". * * .";;
7) echo ". * * *";;
8) echo "* . . .";;
9) echo "* . . *";;
esac
done