while read p; do x=$(curl -o /dev/null -s -w "%{http_code}\n" $p/$1) [[ $x == 200 ]] && curl -s $(curl -s $p/$1) | vim - exit done < ~/.wr.txt