From 865728068c965e066d0f8971c5b5ba26e12e7dce Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 24 Dec 2020 00:06:27 +0530 Subject: Adds scripts and links scripts and wallpapers --- scripts/bin/extract-urls | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 scripts/bin/extract-urls (limited to 'scripts/bin/extract-urls') 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]++'; + -- cgit v1.3.1