diff options
Diffstat (limited to '2015/05')
-rw-r--r-- | 2015/05/puzzle-1.sed | 6 | ||||
-rw-r--r-- | 2015/05/puzzle-2.sed | 4 | ||||
-rwxr-xr-x | 2015/05/puzzles.sh | 6 |
3 files changed, 8 insertions, 8 deletions
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 |