From 66c92cb96e51676e71669dc896763a811a058d62 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Fri, 28 Nov 2025 05:07:06 -0500 Subject: [PATCH] add useful func --- brc2 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/brc2 b/brc2 index 8878114..55884f5 100644 --- a/brc2 +++ b/brc2 @@ -4941,6 +4941,8 @@ psq-exdoc () { psql dl <<<"\i $file" | /a/c/psq-ex | pee cat "sponge -a $file" } + + export BASEFILE_DIR=/a/bin/fai-basefiles #export ANDROID_HOME=/a/opt/android-home @@ -4974,6 +4976,58 @@ letter-hac-fsf() { END {print words, page}' ISAL.txt | sort -n } +## view 100 dirs at a time with i2x +# +# Usage: i2x100 [-i INITIAL_DIR_NUM] [DIRS] +# +# Without DIRS, defaults to *. +i2x100() { + local -i i=0 batch=100; + local -a ds + if [[ $1 == -i ]]; then + i="$2" + shift 2 + fi + + if (( $# )); then + ds=( "$@" ) + else + ds=(*); + fi + echo max ${#ds[@]} + export I2X_SORT_ORDER=path I2X_DISABLE_XINPUT2=1 + for (( ; i<${#ds[@]}; i+=batch)); do + e i=$i + m i2x ${ds[@]:$i:$batch}; + done; }; + + +########################## #################################################### +########################## ########################## +########################## #################################################### +########################## ########################## +########################## #################################################### +########################## ########################## +########################## #################################################### +########################## ########################## +########################## #################################################### +########################## ########################## +########################## #################################################### +########################## ########################## +########################## #################################################### +########################## ########################## +########################## #################################################### +########################## ########################## +########################## #################################################### +########################## ########################## +########################## #################################################### +########################## ########################## + + + + + + # things to remember: # ALT-C - cd into the selected directory -- 2.30.2