From: Steven Baltakatei Sandoval Date: Tue, 21 Oct 2025 09:59:14 +0000 (+0000) Subject: feat(user/randtxt.sh):Move status message to stderr X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/commitdiff_plain/0bd9bb4d2ac8adc1156537e6512b338a70b0ed25?hp=e472f6dee646f74e68c2c0cc22a703824dc7ba67 feat(user/randtxt.sh):Move status message to stderr --- diff --git a/user/randtxt.sh b/user/randtxt.sh index 642b4e0..a6879aa 100755 --- a/user/randtxt.sh +++ b/user/randtxt.sh @@ -1,7 +1,7 @@ #!/bin/bash # Desc: Output random text selection from a text file within a directory # Usage: randtxt.sh DIR -# Version 0.0.5 +# Version 0.0.6 # Depends: Bash 5.1.16, GNU findutils 4.8.0, GNU Coreutils 8.32 # Example: randtxt.sh ~/Calibre\ Library/ @@ -79,7 +79,7 @@ getRandText() { selCount="$(( selEnd - selStart + 1 ))"; # number of bytes within selection # Output context file="$(cut -f2- <<< "${fileSizeList[i]}"; )"; - printf "INFO:Sample of:%s\n" "$file"; + printf "INFO:Sample of:%s\n" "$file" 1>&2; tail --bytes=+$((selStart+1)) -- "$file" | head --bytes=$((selCount)); printf "\n"; return 0;