Skip to content

Instantly share code, notes, and snippets.

@aschiavon91
Created June 29, 2023 19:06
Show Gist options
  • Select an option

  • Save aschiavon91/4eb08f50002a08dcc4b7446985b4b247 to your computer and use it in GitHub Desktop.

Select an option

Save aschiavon91/4eb08f50002a08dcc4b7446985b4b247 to your computer and use it in GitHub Desktop.
[shell] jadlog search last update
# Get last jadlog update in shell
# put in your ~/.bashrc or ~/.zshrc
# usage: jadlog <tracking_number>
# ex: jadlog 00000000000000
jadlog() {
local URL=https://www.jadlog.com.br/siteInstitucional/tracking_dev.jad?cte=$1
curl -s $URL \
| htmlq '#j_idt2_data > tr:last-child > td > span' -t \
| tr '\n' ' ' \
| awk '{print "["$1"]" " ["$5"] " $3 " " $4 " -> " $6 " " $7}' \
| xargs echo
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment