scripts

Various scripts for UNIX-like systems
git clone https://git.tronto.net/scripts
Download | Log | Files | Refs | README

commit 7c049c043c8921e1b5a40da43dfe708d6b3afc59
parent 1f4d73381e34b838427ea9a7553891c8de393957
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Mon, 30 Oct 2023 15:07:06 +0100

Fixed practice dr filtering

Diffstat:
Mpractice | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/practice b/practice @@ -54,7 +54,8 @@ dr_scramble() { max="7" while true; do eo="$(tr -cd 'UDRL' < /dev/random | fold -w "$d" | head -n 1)" - sol="$(${nissy} solve -p drud-eofb "$eo")" + eoinv="$(echo "$eo" | rev | sed 's/./&3/g')" + sol="$(${nissy} solve -p drud-eofb "$eoinv")" len="$(echo "$sol" | wc -w)" if [ "$len" -ge "$min" ] && [ "$len" -le "$max" ]; then break