Skip to content

Instantly share code, notes, and snippets.

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