From: Steven Baltakatei Sandoval Date: Tue, 21 Oct 2025 03:49:28 +0000 (+0000) Subject: chore(user/randtxt.sh):Update description and add glob var comments X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/commitdiff_plain/e472f6dee646f74e68c2c0cc22a703824dc7ba67?ds=sidebyside;hp=9f9597301d4bd3929ce145631ea040b269abed69 chore(user/randtxt.sh):Update description and add glob var comments --- diff --git a/user/randtxt.sh b/user/randtxt.sh index cd242a2..642b4e0 100755 --- a/user/randtxt.sh +++ b/user/randtxt.sh @@ -1,12 +1,12 @@ #!/bin/bash -# Desc: Outputs text at randomish position within dir of text files +# Desc: Output random text selection from a text file within a directory # Usage: randtxt.sh DIR -# Version 0.0.4 +# Version 0.0.5 # Depends: Bash 5.1.16, GNU findutils 4.8.0, GNU Coreutils 8.32 # Example: randtxt.sh ~/Calibre\ Library/ -SAMPLE=10000; -CONTEXT="5000"; # total bytes +1 before and after point within file to print +SAMPLE=10000; # ceiling for number of text files to consider +CONTEXT="5000"; # total bytes +1 of text to display if [[ $(( CONTEXT/2 + CONTEXT/2 )) -lt $CONTEXT ]]; then ((CONTEXT++)); fi;