aboutsummaryrefslogtreecommitdiff
path: root/bin/hurl.sh
blob: 0680c5cee9a678a78bfb6d52dcdd00cc06a04433 (plain) (blame)
1
2
3
4
5
6
7
8
9
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