18 lines
360 B
Bash
18 lines
360 B
Bash
|
|
#!/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
|