Bonjour à tous,
Suites aux ports de TapTempo en Rust, Ada, JS, PERL et python (2.7)
Voilà ma version en bash ;-)
#!/bin/bash
PREV="$(date +%s%N | cut -b1-13)"
TAPS="0"
COUNT="0"
while read -p "tapTempo : press any key (CTRL+D for quit)" tap ; do
CUR="$(date +%s%N | cut -b1-13)"
TAPS="$TAPS + $(($CUR-$PREV))"
PREV=$CUR
COUNT="$(($COUNT + 1))"
done
echo ""