aboutsummaryrefslogtreecommitdiff
path: root/bin/hurl
blob: 16ea48f87ca77ecf7aec88366e6a2c91383b4a18 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
# 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