costs (392B)
1 #!/bin/sh 2 # Copyright 2023 Jacob R. Edwards <jacob@jacobedwards.org> 3 # Wrapper script for costs.awk, total.awk, percentage.awk, etc. 4 5 filter=cat 6 while test $# -gt 0 7 do 8 case "$1" in 9 (-t) filter=./total.awk ;; 10 (-p) filter=./percentage.awk ;; 11 (-*) 12 echo "usage: ${0##*/} [-tp] [args ...] 13 error: $1: invalid option" 1>&2 14 exit 1 ;; 15 (*) break ;; 16 esac 17 shift 18 done 19 20 costs.awk "$@" | $filter