Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F63118651
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
Fri, May 17, 21:42
Size
422 B
Mime Type
text/x-shellscript
Expires
Sun, May 19, 21:42 (2 d)
Engine
blob
Format
Raw Data
Handle
17679425
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