This script when run will extract the data to /tmp as chime.wav, then play the wav file as a sequence derived from the clock, to chime the hours.
Will work to chime the hours if run with Pschedule on the hour.
Code: Select all
#!/bin/bash
dd if="$0" of=/tmp/chime.wav bs=1 skip=131
hours=`date +"%-l"`
seq "$hours" | xargs -I{} aplay -q /tmp/chime.wav
exit;
Code: Select all
cat chime.wav >> hour_chime
chmod +x hour_chime
The script is now a standalone not requiring any external file to function.
The important thing is the skip=? this needs to be precise else the extracted data will be corrupted.