From a0bb023d782dd2d8703670d560b5ccd8d25d640e Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 4 Nov 2021 12:25:04 +0300 Subject: bins: shfmt, weasel suite, spark --- .local/bin/type.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to '.local/bin/type.sh') diff --git a/.local/bin/type.sh b/.local/bin/type.sh index b9dbcd7..2d563f3 100755 --- a/.local/bin/type.sh +++ b/.local/bin/type.sh @@ -1,15 +1,13 @@ #!/usr/bin/env bash sleep 1 -while read line -do - grep -o . <<<$line | while read a - do - sleep 0.$((RANDOM%3)) +while read -r line; do + grep -o . <<< "$line" | while read -r a; do + sleep 0.$((RANDOM % 3)) #2>&1 echo -n "${a:- }" | tee /dev/tty echo -n "${a:- }" | tee /dev/tty done - sleep 0.$((RANDOM%7)) - 1>&2 echo -ne $"\n" + sleep 0.$((RANDOM % 7)) + echo 1>&2 -ne $"\n" echo sleep 1.0 done -- cgit v1.2.3-70-g09d2