Skip to content

Instantly share code, notes, and snippets.

@kiwimato
Last active September 21, 2021 14:13
Show Gist options
  • Save kiwimato/30ccc9ac2a4bd1fc61ae7c6fba4d29a5 to your computer and use it in GitHub Desktop.
Save kiwimato/30ccc9ac2a4bd1fc61ae7c6fba4d29a5 to your computer and use it in GitHub Desktop.
Checks a iaai.com link if the auction is not assigned
#!/bin/bash
# checks a iaai.com auction link if the auction is still not assigned
# Produces output like this:
# 2021-09-21_16:06:23 https://iaai.com/vehicledetails/40812556?tenant=US&RowNumber=2 - Auction still not assigned
# 2021-09-21_16:06:34 https://iaai.com/vehicledetails/40812556?tenant=US&RowNumber=2 - Auction still not assigned
URL_LIST="
https://iaai.com/vehicledetails/40812556?tenant=US&RowNumber=2
"
SLEEP_SECONDS=10 # Number of seconds to sleep between calls
MESSAGE="Auction not assigned" # Message to check for within the URL
while :;do
for link in `echo "$URL_LIST" | grep http`;do
if curl -ks "$link" | grep -q "$MESSAGE"; then
echo "$(date +%Y-%m-%d_%H:%M:%S) $link - Auction still not assigned"
else
echo "$(date +%Y-%m-%d_%H:%M:%S) $link - auction changed state"
fi
done
sleep $SLEEP_SECONDS
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment