Last active
July 16, 2024 22:04
-
-
Save webug-lab/c2c5586ca7388c8f29a7d3bf90659c29 to your computer and use it in GitHub Desktop.
bash
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
#!/bin/bash | |
if [ "$#" -ne 1 ]; then | |
echo "usage: $0 <URL>" | |
exit 1 | |
fi | |
URL="$1" | |
curl -s "$URL" | grep -oP '(?<=href=")[^"]*' |
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
#!/bin/bash | |
if [ "$#" -ne 2 ]; then | |
echo "usage: $0 <URL> <SEARCH_TEXT>" | |
exit 1 | |
fi | |
URL="$1" | |
SEARCH_TEXT="$2" | |
curl -s $URL | grep "$SEARCH_TEXT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment