no octal numbers

This commit is contained in:
Felix Van der Jeugt 2021-12-09 22:45:10 +01:00
parent 621f6b479c
commit b10de59f31
No known key found for this signature in database
GPG key ID: 58B209295023754D
2 changed files with 3 additions and 5 deletions

View file

@ -1,7 +1,7 @@
#!/bin/sh
day="$(printf '%02d' "${1##0}")"
day="$1"
part="$2"
inputfile="$PWD/../inputs/$day.txt"
inputfile="$PWD/../inputs/$(printf '%02d' "${day##0}").txt"
[ -x "prepare" ] || exit 0

View file

@ -2,9 +2,7 @@
day="$1"
part="$2"
day="$(printf '%02d' "$day")"
inputfile="$PWD/inputs/${day}.txt"
inputfile="$PWD/inputs/$(printf '%02d' "${day##0}").txt"
if ! test -f "$inputfile"; then
echo "no input available" >&2