Created
November 10, 2021 06:04
-
-
Save itsfarseen/cfc12142f17128a57d3f672afa8dfdd3 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
if [ -z "$1" ]; then | |
echo "Usage: $0 <tracking number>" | |
echo | |
exit -1 | |
fi; | |
data=$(curl "https://tracking.dtdc.com/ctbs-tracking/customerInterface.tr?submitName=getLoadMovementDetails&cnNo=$1" -X POST) | |
echo $data | jq "[.[] | {Date: (.dateWithNoSuffix + \" \" + .time), Activity: .activityType, From: .origin, To: .dest}]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment