diff options
Diffstat (limited to 'bin/hurl.sh')
-rw-r--r-- | bin/hurl.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/hurl.sh b/bin/hurl.sh new file mode 100644 index 00000000..0680c5ce --- /dev/null +++ b/bin/hurl.sh @@ -0,0 +1,10 @@ +# Extract <a href="..."> URLs from an HTML document or documents + +# Input is either stdin or the given arguments concatenated +cat -- "${@:--}" | + +# Pipe through pup to get all the href links +pup -p 'a attr{href}' | + +# Sort them uniquely +sort | uniq |