Skip to content

Instantly share code, notes, and snippets.

@acklavidian
Created June 11, 2019 14:26
Show Gist options
  • Save acklavidian/8b075aa8ff09a6535248e7b510f6b833 to your computer and use it in GitHub Desktop.
Save acklavidian/8b075aa8ff09a6535248e7b510f6b833 to your computer and use it in GitHub Desktop.
Bitbar Script for tracking OLKB
#!/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