Skip to content

Instantly share code, notes, and snippets.

@pschwede
Last active September 7, 2016 21:19
Show Gist options
  • Save pschwede/98c4580b563d8b8c6948947aee72e051 to your computer and use it in GitHub Desktop.
Save pschwede/98c4580b563d8b8c6948947aee72e051 to your computer and use it in GitHub Desktop.
Measure BPM using just one line in Bash
read -p"Hit Space key at each beat (8x): " -n2; /usr/bin/time -f '%e' -- bash -c "read -n6" |& awk '/\./ {printf("%f\n", 6*60/$0)}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment