Files
advent-bash-2022/1a.sh
2023-12-01 14:20:59 +01:00

16 lines
156 B
Bash
Executable File

#!/usr/bin/env bash
max=0
c=0
while read a; do
if [[ -z "$a" ]]; then
[[ $c -gt $max ]] && max=$c
c=0
else
let c+=$a
fi
done
echo $max