Compare commits
No commits in common. "0d609a713ed89e976d4e510fe13effd124ffda6a" and "57ddd3cb0acb9a7d3f5c600f6afb809c7584188f" have entirely different histories.
0d609a713e
...
57ddd3cb0a
3 changed files with 2 additions and 11 deletions
|
@ -1,9 +0,0 @@
|
||||||
# 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`)
|
|
|
@ -9,6 +9,6 @@ while read f; do
|
||||||
echo $SUM + $i
|
echo $SUM + $i
|
||||||
SUM=$(( $SUM + $i ))
|
SUM=$(( $SUM + $i ))
|
||||||
done
|
done
|
||||||
done < "$1"
|
done < input
|
||||||
|
|
||||||
echo $SUM
|
echo $SUM
|
||||||
|
|
|
@ -22,6 +22,6 @@ while read f; do
|
||||||
echo $f: $FIRST$LAST
|
echo $f: $FIRST$LAST
|
||||||
SUM=$(( $SUM + $FIRST$LAST ))
|
SUM=$(( $SUM + $FIRST$LAST ))
|
||||||
#sleep 1
|
#sleep 1
|
||||||
done < "$1"
|
done < input
|
||||||
|
|
||||||
echo $SUM
|
echo $SUM
|
||||||
|
|
Loading…
Reference in a new issue