diff options
author | June McEnroe <june@causal.agency> | 2023-12-01 10:46:37 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2023-12-01 10:48:36 -0500 |
commit | bd0aa4cd96410bf3053198dfbac453d049ba6579 (patch) | |
tree | 36233697ad7be48108bc92118d4a977737ec5c0c /2023 | |
parent | Solve day 15 part 1 (diff) | |
download | aoc-bd0aa4cd96410bf3053198dfbac453d049ba6579.tar.gz aoc-bd0aa4cd96410bf3053198dfbac453d049ba6579.zip |
Solve day 1 part 1
Diffstat (limited to '2023')
-rw-r--r-- | 2023/day01.awk | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/2023/day01.awk b/2023/day01.awk new file mode 100644 index 0000000..3127556 --- /dev/null +++ b/2023/day01.awk @@ -0,0 +1,7 @@ +{ + gsub("[^[:digit:]]", ""); + part1 += substr($0, 1, 1) substr($0, length, 1); +} +END { + print part1; +} |