Skip to content

Instantly share code, notes, and snippets.

@securibee
Last active October 4, 2023 15:57
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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