#!/bin/sh # flash card substitute # usage: fcard dict.tsv section # the -z code is extremely wip, don't use it while getopts z: opt do case $opt in z) RAND="|grabbag" ;; ?) printf '%s\n' "idiot" 1>&2 && exit 2 ;; esac done shift $((OPTIND - 1)) rand() { tr -cd '[:digit:]'