Skip to content

Instantly share code, notes, and snippets.

@limitusus
Created March 29, 2017 08:52
Show Gist options
  • Save limitusus/f442761ce148c809bf0fcb04f1c1ce6b to your computer and use it in GitHub Desktop.
Save limitusus/f442761ce148c809bf0fcb04f1c1ce6b to your computer and use it in GitHub Desktop.
各エンドポイントが200を返すかどうかをテストする
#!/bin/sh
# Usage: $0 < redirect_list.tsv
while read from to;do
res=$(curl -s -D - -o /dev/null "$from")
if $(echo $res | grep "HTTP/1.1 200" > /dev/null); then
continue
fi
echo "from: $from to: $to"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment