From c8ab406749124d2e762ad5cf53963070113afd0f Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 5 Apr 2017 20:06:39 +1200 Subject: Apply runtime shebanging to POSIX shell --- bin/hurl.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 bin/hurl.sh (limited to 'bin/hurl.sh') 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 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 -- cgit v1.2.3