From 85a3d8d7dbb6ec9d09d15123d5e3953f1c97350d Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Wed, 4 Dec 2019 02:42:48 -0500 Subject: Add alternate shell solution for day 4 --- 2019/day04.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 2019/day04.sh (limited to '2019') diff --git a/2019/day04.sh b/2019/day04.sh new file mode 100644 index 0000000..6cd264a --- /dev/null +++ b/2019/day04.sh @@ -0,0 +1,11 @@ +IFS=- +read min max +seq "$min" "$max" \ + | grep '^1*2*3*4*5*6*7*8*9*$' \ + | grep -E '00|11|22|33|44|55|66|77|88|99' \ + | wc -l +seq "$min" "$max" \ + | grep '^1*2*3*4*5*6*7*8*9*$' \ + | sed 's/.*/x&x/' \ + | grep -E '[^0]00[^0]|[^1]11[^1]|[^2]22[^2]|[^3]33[^3]|[^4]44[^4]|[^5]55[^5]|[^6]66[^6]|[^7]77[^7]|[^8]88[^8]|[^9]99[^9]' \ + | wc -l -- cgit 1.4.1 up> dontfiles
summary refs log tree commit diff
path: root/www/causal.agency/Makefile (unfollow)
Commit message (Expand)Author
2019-10-23Add The Book of the Unnamed MidwifeJune McEnroe
2019-10-22Add ConcreteJune McEnroe
2019-10-14Set the write variable for nvim man modeJune McEnroe
2019-10-13Add All Systems RedJune McEnroe
2019-10-10Add The Book of PhoenixJune McEnroe
2019-10-03Add two Kim Petras songsJune McEnroe
2019-10-02Update neovim 0.4.2June McEnroe
2019-10-02Claim to be curl(1) in titleJune McEnroe
2019-10-02Add The Red Threads of FortuneJune McEnroe
2019-09-28Add The Black Tides of HeavenJune McEnroe
2019-09-27Fail on HTTP failure status in titleJune McEnroe
2019-09-23Add Trail of LightningJune McEnroe
2019-09-22Revert "Enable cookies in title"June McEnroe
2019-09-20Enable cookies in titleJune McEnroe
2019-09-16Use sensitivity aliases in TF2June McEnroe
2019-09-16Add The Just CityJune McEnroe
2019-09-12Only GET the final redirect locationJune McEnroe
2019-09-12Consume entire bodyJune McEnroe
2019-09-10Add title -v flagJune McEnroe
2019-09-10Use curl error bufferJune McEnroe
2019-09-10Set Accept-Encoding in titleJune McEnroe
2019-09-08Set 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