Differences between the pastes
#124420 (16.07.2019 12:09)
and
#168354 (15.03.2021 00:39).
| 1 | | #! /bin/bash
|
| 2 | |
|
| 3 | | # Tests à faire en changeant de fuseau :
|
| 4 | | # cp /usr/share/zoneinfo/Europe/Athens /etc/localtime
|
| 5 | | # cp /usr/share/zoneinfo/Europe/Paris /etc/localtime
|
| 6 | |
|
| 7 | | hmem=$(date +%H)
|
| 8 | | hnow=$(date +%H)
|
| 9 | |
|
| 10 | |
|
| 11 | | while :
|
| 12 | | do
|
| 13 | | hnow=$(date +%H)
|
| 14 | | #echo "Heure actuelle : $hnow - Heure mémorisée : $hmem"
|
| 15 | |
|
| 16 | | if [ $hnow != $hmem ]
|
| 17 | | then
|
| 18 | | #echo "Heure changée"
|
| 19 | | play /home/adrien/tmp/horloge/$hnow.ogg
|
| 20 | | hmem=$hnow
|
| 21 | | fi
|
| 22 | |
|
| 23 | | sleep 1
|