From 1449c6ec4743f7dff7ae192d35301fc138685c98 Mon Sep 17 00:00:00 2001 From: curben Date: Thu, 11 Oct 2018 14:40:18 +1030 Subject: [PATCH] Use simpler sed syntax for matching beginning of a line --- utils/script.sh | 2 +- utils/umbrella-top-1m.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/script.sh b/utils/script.sh index c7c6a835..4095bb18 100755 --- a/utils/script.sh +++ b/utils/script.sh @@ -25,7 +25,7 @@ cut -f 1 -d ':' | \ # Remove www # Only matches domains that start with www # Not examplewww.com -sed -e ':a' -e 'N' -e '$!ba' -e 's/\nwww\./\n/g' | \ +sed -e 's/^www\.//g' | \ # Sort and remove duplicates sort -u | \ # Exclude Umbrella Top 1M. grep inverse match whole line diff --git a/utils/umbrella-top-1m.sh b/utils/umbrella-top-1m.sh index 185c04b5..59b8f598 100755 --- a/utils/umbrella-top-1m.sh +++ b/utils/umbrella-top-1m.sh @@ -16,7 +16,7 @@ cut -f 2 -d ',' | \ # Remove www # Only matches domains that start with www # Not examplewww.com -sed -e ':a' -e 'N' -e '$!ba' -e 's/\nwww\./\n/g' | \ +sed -e 's/^www\.//g' | \ # Remove duplicates sort -u > ../src/top-1m.txt