Created
June 29, 2023 19:06
-
-
Save aschiavon91/4eb08f50002a08dcc4b7446985b4b247 to your computer and use it in GitHub Desktop.
[shell] jadlog search last update
This file contains hidden or 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
| # 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