meow
Dominique Liberda 2022-12-01 03:15:27 -05:00
commit 599a7e7595
2 changed files with 17 additions and 0 deletions

3
01/README.md Normal file
View File

@ -0,0 +1,3 @@
# Day 1
`cat data | ./meow.sh`

14
01/meow.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
meow=()
sum=0
while read line; do
if [[ "$line" == '' ]]; then
meow+=($sum)
sum=0
else
sum=$((sum+line))
fi
done
echo ${meow[@]} | tr ' ' '\n' | sort -n | tail -n1