scripts

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

commit 5e71fa247d53d628e111fcb2cf0f2b33bf167df7
parent 2d4d0f339ab2bfc5c0d74bd18048f96499172e85
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Sun, 29 Oct 2023 12:06:09 +0100

Added practice

Diffstat:
MMakefile | 1+
Apractice | 34++++++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile @@ -26,6 +26,7 @@ SCRIPTS = addressgrep \ popup-cal12 \ popup-cal3 \ popup-terminal \ + practice \ secret \ sel \ share \ diff --git a/practice b/practice @@ -0,0 +1,34 @@ +#!/bin/sh + +# Script based on nissy (see https://nissy.tronto.net) to practice FMC + +# Usage: practice [htr] + +usage() { + echo "Usage: practice [htr]" +} + +htr() { + while true; do + scr="$(nissy scramble dr)" + echo "$scr" + read -r x + nissy solve -o htr "$scr" + read -r x + done +} + +if [ -z "$1" ]; then + usage + exit 1 +fi + +case "$1" in + htr) + htr + ;; + *) + usage + exit 1 + ;; +esac