Skip to content

Instantly share code, notes, and snippets.

@alirezapla
Created August 5, 2023 20:41
Show Gist options
  • Save alirezapla/39109b7d403ebb04307dd8858341707d to your computer and use it in GitHub Desktop.
Save alirezapla/39109b7d403ebb04307dd8858341707d to your computer and use it in GitHub Desktop.
#!/bin/bash
status=$(curl -I $1 2>/dev/null | head -n 1 | cut -d$' ' -f2)
while [ $status -ne 200 ];
do
echo ret is: [$status]
status=$(curl -I $1 2>/dev/null | head -n 1 | cut -d$' ' -f2)
done
echo ret is: [$status]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment