Skip to content

Instantly share code, notes, and snippets.

@dorian-marchal
Created March 1, 2018 12:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dorian-marchal/40d9da867d2f1ee965902bbc28ff00f9 to your computer and use it in GitHub Desktop.
Save dorian-marchal/40d9da867d2f1ee965902bbc28ff00f9 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
DEDIBOX_LABEL='Dedibox XC SSD 2016'
dedibox_page_html=$(curl --silent https://console.online.net/en/order/server)
dedibox_count_label=$(echo $dedibox_page_html | grep -oP "$DEDIBOX_LABEL"'.*?label \K(.*?)(?=")')
if [[ $dedibox_count_label != 'label-' ]]; then
echo "Dedibox $DEDIBOX_LABEL Dispo!"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment