![]() |
|
|||||||
| Programming C, bash, Python, Perl, PHP, Java, you name it. |
![]() |
|
|
Thread Tools | Display Modes |
|
|||
|
Code:
#!/bin/sh
# play soundfile after certain amount of time
# using OpenBSD 'aucat(1)'
SOUNDFILE="/home/j65nko/thesilentforce/track01.wav"
while true ; do
printf "Time to wait (mm:ss) = "
read time
#time='0:10'
minutes=${time%:*}
seconds=${time#*:}
pause=$((minutes*60+seconds))
echo "Waiting $time (${pause} seconds) ...."
sleep ${pause}
echo =======================
echo Playing ${SOUNDFILE}
aucat -i $SOUNDFILE
echo ======================
done
Code:
$ ./alert-me Time to wait (mm:ss) : 37:00 Waiting 37:00 (2220 seconds) .... ======================= Playing /home/j65nko/thesilentforce/track01.wav ====================== Time to wait (mm:ss) = ^C
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New tool to make child's play of DNSSEC signatures | J65nko | News | 1 | 17th November 2010 09:13 PM |
| Why I am logged out of this forum every few minutes? | Broodjegehaktmetmayo | Off-Topic | 0 | 14th December 2009 04:42 PM |
| Skype-out calls disconnect after about 5 minutes | lumiwa | FreeBSD Ports and Packages | 0 | 9th June 2009 12:56 PM |
| Play mediastream | PatrickBaer | FreeBSD General | 12 | 27th September 2008 09:54 AM |
| How to play an avi video? | aleunix | OpenBSD Packages and Ports | 3 | 16th June 2008 06:25 AM |