Alarm In Bash

I was looking on the internet for a Bash script to play a tone for use in a bash script and couldn’t come up with anything so here’s what I wrote.  It will play the Westminster Quarters

#!/bin/bash
E=329.63
Gs=415.30
Fs=369.99
B=246.94
for X in $E $Gs $Fs $B $E $Fs $Gs $E $Gs $E $Fs $B $B $Fs $Gs $E
do
speaker-test -c1 -f$X -t sine -l1 -b5 > /dev/null
done

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s