Created
April 7, 2021 04:39
-
-
Save vsec7/a945bdf16b887c2569d53003252d2c80 to your computer and use it in GitHub Desktop.
Generate random awb DHL (delivered only)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo;while :;do d=10;a=$(date +%s);b=$((a*RANDOM));while [ ${#b} -lt 10 ]; do b="${b}$RANDOM";done;g=$(curl -s "https://mydhl.express.dhl/shipmentTracking?AWB=$(echo "${b:0:d}")&countryCode=id&languageCode=en" | jq .results[0]); if [ $(echo $g | jq -r .delivery.status) == "delivered" ]; then printf "%s | %s| ori: %s | dest: %s\n" "$(echo $g | jq -r .id)" "$(echo $g | jq -r .checkpoints[0].date)" "$(echo $g | jq -r .origin.value)" "$(echo $g | jq -r .destination.value)" | tee -a dhlawb.txt;fi;done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment