From 1481100e0d4c93a99153ebef688cc1df306e7ca8 Mon Sep 17 00:00:00 2001 From: Emile Clark-Boman Date: Sat, 27 Sep 2025 13:30:46 +1000 Subject: [PATCH] add hexyl based unity levelN file explorer --- scripts/unitylevel.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 scripts/unitylevel.sh 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