FDATE=2014-03-11;
echo -ne "${FDATE},";
echo "SELECT GROUP_CONCAT(C) FROM (SELECT TileLevel, SUM(DataCount) AS C FROM Tiles GROUP BY TileLevel ORDER BY TileLevel);" \
|sqlite3 "file:///Users/safecast/Library/Containers/com.ndolezal.GeigerBotOSX/Data/Documents/safecast-${FDATE}.sqlite?mode=ro"
Example output:
2014-03-11,1550,3776,9007,20921,47868,107757,238637,519460,1110576,2306115,4446887,7452290,11124533,15219118
Initial code:
Example output: 2014-03-11,1550,3776,9007,20921,47868,107757,238637,519460,1110576,2306115,4446887,7452290,11124533,15219118