advent-of-code/2022/day01/main.sh
2022-12-17 01:16:18 +01:00

4 lines
121 B
Bash
Executable file

#!/bin/sh
paste -sd+ /dev/stdin | sed 's/++/\n/g' | bc | sort -n
# ./main.sh < input2.txt | tail -3 | paste -sd+ - | bc