I’m having trouble removing double quotes from the date I pass in to JQ. Any idea how I can do that? -r doesn’t seem to do the trick.
curl SOMETHING | jq -r --arg date $(date +"%s") '.payload.overallStatus | [$date, .totalTimeSpent, .totalRecords, .totalDuplicates]'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 607 100 607 0 0 10649 0 --:--:-- --:--:-- --:--:-- 10649
[
"1594330317",
15802,
89004346,
10
]
(I plan to add the | @csv option to convert the output to a line of csv)