#!/bin/bash NEW=$(curl -s http://127.0.0.1:8765 -H "Content-Type: application/json" -d '{ "action":"findCards", "version":6, "params":{ "query":"is:new" } }') DUE=$(curl -s http://127.0.0.1:8765 -H "Content-Type: application/json" -d '{ "action": "findCards", "version": 6, "params": { "query": "is:due" } }') DONE=$(curl -s http://127.0.0.1:8765 -H "Content-Type: application/json" -d '{ "action": "getNumCardsReviewedToday", "version": 6 }') echo "new:$(echo $NEW | jq '.result | length') due:$(echo $DUE | jq '.result | length') done:$(echo $DONE | jq '.result')"