commands work even with extra spaces at the beginning.
This commit is contained in:
1 parent
a190c08bdf
commit
09061a7e76
2 files changed
+14
-7
No files matched your search
@@ -2,10 +2,12 @@
|
||||
|
||||
curl="$(command -v curl)"
|
||||
for l in $3 ; do
|
||||
if [[ "$l" =~ http://|https://|www\.* ]]; then
|
||||
if [[ "$l" =~ http://|https://|www\.*.* ]]; then
|
||||
pageTitle="$($curl -Ls "${l/#:/}" | grep "<title>" | html2text | tr '[:space:]' ' ')"
|
||||
shortLink="${l#*://}"
|
||||
shortLink="${shortLink%%/*}"
|
||||
if ! [[ "$pageTitle" =~ \ + ]]; then
|
||||
msg "$2" "$pageTitle at $shortLink"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
Reference in new issue
Block a user