Compare commits

...

2 commits

Author SHA1 Message Date
0d609a713e
Added Day 1 README 2023-12-04 22:43:37 -07:00
983e4a56a2
Day 1 scripts can now take arbitrary files 2023-12-04 22:43:05 -07:00
3 changed files with 11 additions and 2 deletions

9
day1/README.md Normal file
View file

@ -0,0 +1,9 @@
# AOC 2023 Day 1 (Shell Script)
This is a solver for AOC 2023 Day 1 made in Bash
### Requirements:
- Bash
### Usage:
1. Run the script with the input file specified as an argument (ex. `./day1p1.sh input`)

View file

@ -9,6 +9,6 @@ while read f; do
echo $SUM + $i
SUM=$(( $SUM + $i ))
done
done < input
done < "$1"
echo $SUM

View file

@ -22,6 +22,6 @@ while read f; do
echo $f: $FIRST$LAST
SUM=$(( $SUM + $FIRST$LAST ))
#sleep 1
done < input
done < "$1"
echo $SUM