Use cross-platform sed syntax
https://stackoverflow.com/questions/1251999/how-can-i-replace-a-newline-n-using-sed?page=1&tab=votes#comment9175314_1252191
This commit is contained in:
parent
88d6447fe0
commit
6c030d840e
|
@ -25,7 +25,7 @@ cut -f 1 -d ':' | \
|
|||
# Remove www
|
||||
# Only matches domains that start with www
|
||||
# Not examplewww.com
|
||||
sed ':a;N;$!ba;s/\nwww\./\n/g' | \
|
||||
sed -e ':a' -e 'N' -e '$!ba' -e 's/\nwww\./\n/g' | \
|
||||
# Sort and remove duplicates
|
||||
sort -u | \
|
||||
# Exclude Umbrella Top 1M. grep inverse match whole line
|
||||
|
|
|
@ -16,7 +16,7 @@ cut -f 2 -d ',' | \
|
|||
# Remove www
|
||||
# Only matches domains that start with www
|
||||
# Not examplewww.com
|
||||
sed ':a;N;$!ba;s/\nwww\./\n/g' | \
|
||||
sed -e ':a' -e 'N' -e '$!ba' -e 's/\nwww\./\n/g' | \
|
||||
# Remove duplicates
|
||||
sort -u > ../src/top-1m.txt
|
||||
|
||||
|
|
Loading…
Reference in New Issue