advent-of-code/2022/day01/main.sh

4 lines
121 B
Bash
Raw Normal View History

2022-12-17 01:16:18 +01:00
#!/bin/sh
paste -sd+ /dev/stdin | sed 's/++/\n/g' | bc | sort -n
# ./main.sh < input2.txt | tail -3 | paste -sd+ - | bc