Last active
June 3, 2024 19:52
-
-
Save securibee/f15f8c7aaa0593cc32fc30f58540463f to your computer and use it in GitHub Desktop.
Grep URL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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