summary refs log tree commit diff homepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--2023/day01.awk7
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;
+}