mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
more performant grepping
This commit is contained in:
parent
b777c7470e
commit
995c29e378
@ -3,8 +3,7 @@
|
|||||||
if echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null; then
|
if echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null; then
|
||||||
url="$1"
|
url="$1"
|
||||||
else
|
else
|
||||||
url="$(grep 'rel="self"' "$1" |
|
url="$(grep -Eom1 '<[^>]+(rel="self"|application/[a-z]+\+xml)[^>]+>' "$1" |
|
||||||
grep xml |
|
|
||||||
sed -E 's_^.*href="(https?://[^"]+)".*$_\1_')"
|
sed -E 's_^.*href="(https?://[^"]+)".*$_\1_')"
|
||||||
|
|
||||||
! grep "https*://\S\+\.[A-Za-z]\+\S*" <<<"$url" &&
|
! grep "https*://\S\+\.[A-Za-z]\+\S*" <<<"$url" &&
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user