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" |
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" |