Changes between Version 1 and Version 2 of jazz/18-05-24
- Timestamp:
- May 24, 2018, 3:34:35 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
jazz/18-05-24
v1 v2 3 3 == jq == 4 4 5 *同事寫了個有趣的 jq 範例,可以把 epoch 時間戳記的欄位用 jq 轉成 ISO 格式~5 同事寫了個有趣的 jq 範例,可以把 epoch 時間戳記的欄位用 jq 轉成 ISO 格式~ 6 6 {{{ 7 7 kafkacat -q -b kafka1 -t ${topic} | jq -c '. | select ( ( now - .epoch) > 60) | [.receiveServer, (.epoch|todateiso8601)]' 8 8 }}} 9 10 * 參考: 11 * https://stackoverflow.com/questions/44497533/jq-transform-unix-timestamp-to-datetime 12 * https://stedolan.github.io/jq/manual/v1.5/#Dates