Skip to content

Instantly share code, notes, and snippets.

@i-sync
Created August 10, 2017 05:27
Show Gist options
  • Save i-sync/a2522ff663b69b8dd64ee09f0e29566a to your computer and use it in GitHub Desktop.
Save i-sync/a2522ff663b69b8dd64ee09f0e29566a to your computer and use it in GitHub Desktop.
half and hour play corresponding time voice file
#!/bin/bash
filePath=/home/pi/timeaudio
#time=`date | awk -F \ {'print $4'} | awk -F : {'print $1'}`
time=`date +%H%M`
audioFile="$filePath/$time.mp3"
echo $audioFile
player=/usr/bin/mplayer
$player $audioFile
#$player >> /tmp/1.log
#echo $audioFile >> /tmp/1.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment