Skip to content

Instantly share code, notes, and snippets.

@securibee
Last active June 3, 2024 19:52
Show Gist options
  • Save securibee/f15f8c7aaa0593cc32fc30f58540463f to your computer and use it in GitHub Desktop.
Save securibee/f15f8c7aaa0593cc32fc30f58540463f to your computer and use it in GitHub Desktop.
Grep URL
cat urls.html | grep -Eo "(http|https)://[a-zA-Z0-9./?=_-]*" | sort -u
grep -E : is the same as egrep
grep -o : only outputs what has been grepped
(http|https) : is an either / or
a-z : is all lower case
A-Z : is all uper case
. : is dot
/ : is the slash
? : is ?
*: is repeat the [...] group
sort -u : will sort & remove any duplicates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment