Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F65433735
check_http.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jun 3, 18:55
Size
422 B
Mime Type
text/x-shellscript
Expires
Wed, Jun 5, 18:55 (2 d)
Engine
blob
Format
Raw Data
Handle
18071463
Attached To
rPHINFRA c4science
check_http.sh
View Options
#!/bin/bash
ROOT=$1
if [ "a$ROOT" == 'a' ]; then
echo -e "USAGE:\n$0 https://c4science.ch"
exit 1
fi
URLS=$(curl --silent $ROOT/sitemap.xml \
| grep -v '0.0\|0.4' \
| sed 's/http/\nhttp/g' \
| grep $ROOT \
| sed 's/\(^http[^ <]*\)\(.*\)/\1/g')
for url in $URLS; do
curl --no-buffer --silent --include $url \
| head -n 1 \
| grep '200 OK' 1> /dev/null \
|| echo $url
done
Event Timeline
Log In to Comment