summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2023-12-01 10:46:37 -0500
committerJune McEnroe <june@causal.agency>2023-12-01 10:48:36 -0500
commitbd0aa4cd96410bf3053198dfbac453d049ba6579 (patch)
tree36233697ad7be48108bc92118d4a977737ec5c0c
parentSolve day 15 part 1 (diff)
downloadaoc-bd0aa4cd96410bf3053198dfbac453d049ba6579.tar.gz
aoc-bd0aa4cd96410bf3053198dfbac453d049ba6579.zip
Solve day 1 part 1
-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;
+}
0c5dcaf5f0d9a5458c87a2&follow=1'>Set title User-AgentJune McEnroe 2019-09-07Add -x flag to titleJune McEnroe 2019-09-07Ignore SIGPIPE in relayJune McEnroe 2019-09-07Add A Memory Called EmpireJune McEnroe 2019-09-05Handle lack of Content-TypeJune McEnroe 2019-09-05Use CURLINFO_CONTENT_TYPEJune McEnroe 2019-09-05Decode entities in titlesJune McEnroe 2019-09-05Print title as soon as it's availableJune McEnroe 2019-09-05Use CURL_PREFIX to set flagsJune McEnroe 2019-09-05Add titleJune McEnroe 2019-09-04Add Avorter n'est pas tuerJune McEnroe 2019-08-29Unset executable on shell scriptsJune McEnroe 2019-08-29Add long-missing setopt to bin.7June McEnroe 2019-08-29Add editJune McEnroe