Skip to content

Instantly share code, notes, and snippets.

@itsfarseen
Created November 10, 2021 06:04
Show Gist options
  • Save itsfarseen/cfc12142f17128a57d3f672afa8dfdd3 to your computer and use it in GitHub Desktop.
Save itsfarseen/cfc12142f17128a57d3f672afa8dfdd3 to your computer and use it in GitHub Desktop.
#!/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