aboutsummaryrefslogtreecommitdiff
path: root/scripts/bin/extract-urls
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xscripts/bin/extract-urls8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/bin/extract-urls b/scripts/bin/extract-urls
new file mode 100755
index 0000000..b925e86
--- /dev/null
+++ b/scripts/bin/extract-urls
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+REGEX="(https?://|www\\.)[\.A-Za-z0-9\-]+\\.[a-zA-Z]{2,4}(/[^ ]*)?"
+
+while read line; do echo "$line"; done | \
+ egrep -o "$REGEX" | \
+ awk '!seen[$0]++';
+