From 3ede5c607952c8779d7acf0fb061635e046d66db Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Thu, 9 Dec 2021 23:18:29 +0100 Subject: [PATCH] eh complexity in these scripts not in each repo --- 2021/benchmark | 4 ++-- 2021/complete-benchmark | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/2021/benchmark b/2021/benchmark index 5bbf638..681cbef 100755 --- a/2021/benchmark +++ b/2021/benchmark @@ -1,7 +1,7 @@ #!/bin/sh -day="$1" +day="$(printf '%02d' ${1##0})" part="$2" -inputfile="$PWD/../inputs/$(printf '%02d' "${day##0}").txt" +inputfile="$PWD/../inputs/${day}.txt" [ -x "prepare" ] || exit 0 diff --git a/2021/complete-benchmark b/2021/complete-benchmark index f558572..7204b36 100755 --- a/2021/complete-benchmark +++ b/2021/complete-benchmark @@ -1,8 +1,8 @@ #!/bin/sh -day="$1" +day="$(printf '%02d' ${1##0})" part="$2" -inputfile="$PWD/inputs/$(printf '%02d' "${day##0}").txt" +inputfile="$PWD/inputs/${day}.txt" if ! test -f "$inputfile"; then echo "no input available" >&2