diff options
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/misc/flash.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/misc/flash.sh b/tools/misc/flash.sh index 5bd48bc..93ce8fd 100755 --- a/tools/misc/flash.sh +++ b/tools/misc/flash.sh | |||
| @@ -1,11 +1,17 @@ | |||
| 1 | #! /bin/bash | 1 | #! /bin/bash |
| 2 | 2 | ||
| 3 | while true; do | 3 | while true; do |
| 4 | CARD="$(cat ~/log/flashcards.md | shuf | head -1)" | 4 | CARDS="$(cat ~/log/flashcards.md | shuf | head -5)" |
| 5 | CARD="$(<<<"$CARDS" sed -n 3p)" | ||
| 5 | 6 | ||
| 6 | # Print the Question | 7 | # Print the Question |
| 7 | <<<"$CARD" tr -s '\t' | cut -f1 | 8 | <<<"$CARD" tr -s '\t' | cut -f1 |
| 8 | echo | 9 | echo |
| 10 | tput bold; tput setaf 1 | ||
| 11 | <<<"$CARDS" tr -s '\t' | cut -f2 | tr '\n' '\t' | ||
| 12 | tput sgr0 | ||
| 13 | echo | ||
| 14 | echo | ||
| 9 | echo ---- | 15 | echo ---- |
| 10 | echo | 16 | echo |
| 11 | 17 | ||