#!/usr/bin/env bash
# Desc: Mixes input lines while also preserving some neighbors
# Usage: cat file | bkshuf arg1
-# Version 0.1.1
+# Version 0.1.2
# Depends: bc 1.07.1, GNU Coreutils 8.32 (shuf)
# Input: var: arg1 initial lines to output
lc_out="0"; # init output line counter
if [[ -z "$lc_out_max" ]]; then lc_out_max="$lco"; fi;
ip="$(shuf -i0-$(( lco - 1 )) -n1)"; # init input index pointer
+ RANDOM="$(shuf -i0-32767 -n1)"; # init Bash PRNG
n_loop1="0";
#yell "DEBUG:max_blanks:$max_blanks"
while [[ $lcr -ge 1 ]] && [[ $lc_out -lt $lc_out_max ]]; do