Created
June 11, 2019 14:26
-
-
Save acklavidian/8b075aa8ff09a6535248e7b510f6b833 to your computer and use it in GitHub Desktop.
Bitbar Script for tracking OLKB
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
#!/usr/bin/env bash | |
order_number=100001111 | |
orders=$(curl -s https://orders.olkb.com | grep -E '10000\d{4}') | |
order_count=$(echo "$orders" | wc -l) | |
order_line=$(echo "$orders" | grep -n $order_number) | |
order_position=$(echo "$order_line" | grep -o '^\d*') | |
echo olkb:$order_position | |
echo '---' | |
echo total:$order_count | |
echo "Order#:$order_number" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment