From bd0aa4cd96410bf3053198dfbac453d049ba6579 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Fri, 1 Dec 2023 10:46:37 -0500 Subject: Solve day 1 part 1 --- 2023/day01.awk | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 2023/day01.awk (limited to '2023') 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; +} -- cgit 1.4.1