任何人可以幫我SED得到的時間,緯度和經度根據以下文字SED提取物價值
{"class":"TPV","tag":"MID2","device":"/dev/ttyUSB0","mode":3,"time":"2012-10-02T10:43:21.000Z","ept":0.005,"lat":55.190682291,"lon":25.265912847,"alt":19.149,"epx":58.300,"epy":74.796,"epv":144.575,"track":148.2723,"speed":1.623,"climb":-1.471,"eps":149.59}
awk -F,'{如果(i = 1; i <= NF; i ++)if($ i〜/ time | lat | lon /){match($ i,/^\「([^ \」] +):「 ([^ \「] +)\」?/,array); printf「%s:%s \ n」,array [1],array [ 2]}}'/tmp/gpsdata-clean.txt : : : – dannymagat
非常感謝你 – dannymagat
@ user1679990:如果這個或其他答案在這裏爲你工作,你應該考慮接受它。要做到這一點,請點擊您最喜歡的答案左側的勾號。乾杯。 – Steve