mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-03-13 16:45:22 +01:00
17 lines
400 B
Bash
Executable file
17 lines
400 B
Bash
Executable file
#!/bin/bash
|
|
|
|
SEARCHDIR="./Ingegneria del Software/"
|
|
|
|
echo "Invalid URLs:"
|
|
|
|
for img in `grep "img" "$SEARCHDIR" -R | sed -E 's/^(.*?)\.txt\:img\=//'`; do
|
|
img=$(echo "$img"|tr -d '\n'|tr -d '\r')
|
|
curl -I "$img" 2>/dev/null | \
|
|
grep -i "Content-Type: image/" >/dev/null
|
|
if [ "$?" -ne 0 ]; then
|
|
(
|
|
cd "$SEARCHDIR"
|
|
grep "$img" . -R
|
|
)
|
|
fi
|
|
done
|