14 lines
186 B
Bash
14 lines
186 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
mplayer mus.mp3 > /dev/null &
|
||
|
START=$(date +%s.%N)
|
||
|
|
||
|
> mus.beats
|
||
|
|
||
|
while true; do
|
||
|
read n
|
||
|
END=$(date +%s.%N)
|
||
|
DIFF=$(echo "$END - $START" | bc)
|
||
|
echo $DIFF >> mus.beats
|
||
|
done
|