add hexyl based unity levelN file explorer
This commit is contained in:
parent
76a2390861
commit
1481100e0d
1 changed files with 17 additions and 0 deletions
17
scripts/unitylevel.sh
Executable file
17
scripts/unitylevel.sh
Executable file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue