diff options
author | Thomas Voss <mail@thomasvoss.com> | 2022-11-30 12:23:17 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2022-11-30 12:23:17 +0100 |
commit | f3e3e3e354b87f4ce27bd74bf14cec05d06974b6 (patch) | |
tree | 112352e9c3ba5d5d924036def2b5f853d3f8dc28 /2015/05 | |
parent | 4742dd73046c53cff7fe54deee58358c3b193206 (diff) |
Lots of cleanup and stuff
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 |