vellezz.info

Sprawdzenie statusu html dla adresów Bash inline

Dec
06

Jak odpytać adresy url o status html z bash’a?

for i in "http://google.pl" "http://wp.pl"; do echo "$i"; curl -I "$i" 2>/dev/null| head -n 1 | cut -d$' ' -f2;done;

 

tak może trochę czytelniej:

domains=("http://google.pl" "http://wp.pl");for i in "${domains[@]}"; do echo "$i"; curl -I "$i" 2>/dev/null | head -n 1 | cut -d$' ' -f2;done;

 

Leave a Reply