From f3e3e3e354b87f4ce27bd74bf14cec05d06974b6 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 30 Nov 2022 12:23:17 +0100 Subject: Lots of cleanup and stuff --- 2015/05/puzzle-1.sed | 6 +++--- 2015/05/puzzle-2.sed | 4 ++-- 2015/05/puzzles.sh | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to '2015/05') diff --git a/2015/05/puzzle-1.sed b/2015/05/puzzle-1.sed index 9cba7ad..7dd514b 100644 --- a/2015/05/puzzle-1.sed +++ b/2015/05/puzzle-1.sed @@ -1,3 +1,3 @@ -/ab\|cd\|pq\|xy/d -/\(.\)\1/!d -/\(.*[aeiou].*\)\{3\}/p +/ab|cd|pq|xy/d +/(.)\1/!d +/(.*[aeiou].*){3}/p diff --git a/2015/05/puzzle-2.sed b/2015/05/puzzle-2.sed index 908afdf..182d85c 100644 --- a/2015/05/puzzle-2.sed +++ b/2015/05/puzzle-2.sed @@ -1,2 +1,2 @@ -/\(.\).\1/!d -/\(..\).*\1/p +/(.).\1/!d +/(..).*\1/p diff --git a/2015/05/puzzles.sh b/2015/05/puzzles.sh index 57ddb11..4959366 100755 --- a/2015/05/puzzles.sh +++ b/2015/05/puzzles.sh @@ -1,6 +1,6 @@ -#!/usr/bin/env sh +#!/bin/sh # Could do this with just grep(1) and skip using wc(1), but I am lazy -sed -nf puzzle-1.sed input | wc -l -sed -nf puzzle-2.sed input | wc -l +sed -Enf puzzle-1.sed input | wc -l +sed -Enf puzzle-2.sed input | wc -l -- cgit v1.2.3