From 6b81076e8da1060771832ae4fe1527559ea72acd Mon Sep 17 00:00:00 2001 From: SkwalExe Date: Wed, 23 Mar 2022 05:58:55 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A0=20don't=20see=20every=20chars=20ap?= =?UTF-8?q?pear=20on=20the=20lines=20one=20by=20one?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mini-matrix.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mini-matrix.sh b/mini-matrix.sh index c996025..2e7d5d4 100755 --- a/mini-matrix.sh +++ b/mini-matrix.sh @@ -105,13 +105,15 @@ done function matrix() { + line="" for ((i=0; i<=n_chars; i++)); do # get random char out of custom chars char=$(echo "$custom_chars" | fold -w1 | shuf | head -n1) - echo -n $char + line="$line$char" done + printf "%s" "$line" } @@ -146,7 +148,7 @@ case $command in ;; version) - echo "mini-matrix 1.0" + echo "mini-matrix 0.2.0" ;; esac