Day 3
This commit is contained in:
7
2024/day-3/solution-1.sh
Normal file
7
2024/day-3/solution-1.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
grep -Eo 'mul\([0-9]+,[0-9]+\)' input |
|
||||
sed -E 's/^mul\(([0-9]+),([0-9]+)\)/\1*\2/g' |
|
||||
bc |
|
||||
paste -s -d "+" |
|
||||
bc
|
Reference in New Issue
Block a user