diff --git a/scripts/unitylevel.sh b/scripts/unitylevel.sh new file mode 100755 index 0000000..7ebf17b --- /dev/null +++ b/scripts/unitylevel.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# USAGE: ./unitylevel.sh line [dir] + +LINE="$1" +DIR=${2+"$(realpath $2)/"}; + +clear; +for i in $(ls ${DIR}level* | awk '{ print substr($1, 6, length($1)) }' | sort -n); do + echo -n "${LINE}:level${i} " + if [[ $i -lt 10 ]]; then + echo -n ' ' + fi; + + hexyl "level$i" \ + | head -n $(( "$LINE" + 1 )) \ + | tail -n 1 +done