1
0
mirror of https://github.com/ru-de/faq.git synced 2024-11-22 18:32:19 +00:00
This commit is contained in:
Evgeniy Sokolov 2017-01-13 02:14:17 +01:00
parent 15c0e59a68
commit c907f18d7e
2 changed files with 2 additions and 1 deletions

View File

@ -38,7 +38,7 @@ while read FILE; do
echo "Проверка файла $FILE на битые ссылки... "; echo "Проверка файла $FILE на битые ссылки... ";
while read LINK; do while read LINK; do
echo -n "Ссылка $LINK ... "; echo -n "Ссылка $LINK ... ";
REGEXP_LINK=$(echo $LINK | sed 's/[]\.|$(){}?+*^]/\\&/g') REGEXP_LINK=$(echo $LINK | sed 's/[]\.|$(){}?+*^[]/\\&/g')
LINK=$(echo "$LINK" | sed -e 's/\[/\\\[/g' -e 's/\]/\\\]/g' -e 's/\&/\&/g') LINK=$(echo "$LINK" | sed -e 's/\[/\\\[/g' -e 's/\]/\\\]/g' -e 's/\&/\&/g')
status=$(curl --insecure -XGET -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36" -m 10 -L -s --head -w %{http_code} $LINK -o /dev/null) status=$(curl --insecure -XGET -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36" -m 10 -L -s --head -w %{http_code} $LINK -o /dev/null)
expectedStatus=$(grep -oP "[^,]+,$REGEXP_LINK$" files/known_url.txt | cut -d',' -f1) expectedStatus=$(grep -oP "[^,]+,$REGEXP_LINK$" files/known_url.txt | cut -d',' -f1)

View File

@ -1,4 +1,5 @@
302,https://github.com/ewgRa/de_faq/blob/master/files/Einladung%20(short%20term).docx?raw=true 302,https://github.com/ewgRa/de_faq/blob/master/files/Einladung%20(short%20term).docx?raw=true
302,https://github.com/ewgRa/de_faq/blob/master/files/Einladung%20(long%20term).docx?raw=true
000,https://www.envivas.de/de/tarife-und-service/zusatzversicherungen/auslandsreise/travelxl 000,https://www.envivas.de/de/tarife-und-service/zusatzversicherungen/auslandsreise/travelxl
000,https://www.envivas.de/de/tarife-und-service/zusatzversicherungen/auslandsreise/travelxf 000,https://www.envivas.de/de/tarife-und-service/zusatzversicherungen/auslandsreise/travelxf
000,https://www.envivas.de/ 000,https://www.envivas.de/