Skip to content

Instantly share code, notes, and snippets.

@pjg11
pjg11 / aoc23.sh
Last active December 31, 2023 15:45
Solutions for Advent Of Code 2023
#!/usr/bin/env bash
set -eu
echo '--- Day 1: Trebuchet?! ---'
echo -n 'Part 1: '
# Combine first and last instance of digit as a two-digit number and find
# sum. Sample input:
#
# 1abc2 -> 12