需要一些幫助來返回2個特定定界符內的日志文件中的所有數據。我們通常有以下日志:2018-04-17 03:59:29,243 TRACE [xml] This is just a test.2018-04-17 13:22:24,230 INFO [properties] I believe this is another test.2018-04-18 03:48:07,043 ERROR [properties] (Thread-13) UpdateType: more data coming here; ProcessId: 50102018-04-17 13:22:24,230 INFO [log] I need to retrieve this string hereand also this one as it is part of the same text2018-04-17 13:22:24,230 INFO [det] I believe this is another test.如果我將grep設為“ here”,則僅獲得包含單詞的行,但實際上我需要檢索整個文本,則中斷可能也導致了我的問題。2018-04-17 13:22:24,230 INFO [log] I need to retrieve this string hereand also this one as it is part of the same text我們可以在日志文件中有幾個“這里”。我試圖通過sed做到這一點,但是我找不到正確的方法來使用定界符,我認為這應該是整個DATE。
返回參數sed / grep / awk / gawk中的字符串
慕婉清6462132
2021-04-01 13:10:23