在Unix領域相當新穎,我目前正試圖從文本文件中提取數據集。我嘗試過使用sed,grep,awk,但它似乎只能用於提取行,但我想提取整個數據集...以下是我想從中提取2個數據集的文件示例「時間強度」線)如何從文本文件中提取數據集?
[Header]
Application Name LabSolutions
Version 5.87
Data File Name C:\LabSolutions\Data\Antoine\170921_AC_FluoSpectra\069_WT3a derivatized lignin LiCl 430_GPC_FOREVER_430_049.lcd
Output Date 2017-10-12
Output Time 12:07:32
[Configuration]
Instrument Name BOTAN127-Instrument1
Instrument # 1
Line # 1
# of Detectors 3
Detector ID Detector A Detector B PDA
Detector Name Detector A Detector B PDA
# of Channels 1 1 2
[LC Chromatogram(Detector A-Ch1)]
Interval(msec) 500
# of Points 9603
Start Time(min) 0,000
End Time(min) 80,017
Intensity Units mV
Intensity Multiplier 0,001
Ex. Wavelength(nm) 405
Em. Wavelength(nm) 430
R.Time (min) Intensity
0,00000 -709779
0,00833 -709779
0,01667 17
0,02500 3
0,03333 7
0,04167 19
0,05000 9
0,05833 5
0,06667 2
0,07500 24
0,08333 48
[LC Chromatogram(Detector B-Ch1)]
Interval(msec) 500
# of Points 9603
Start Time(min) 0,000
End Time(min) 80,017
Intensity Units mV
Intensity Multiplier 0,001
R.Time (min) Intensity
0,00000 149
0,00833 149
0,01667 -1
我將不勝感激任何想法。提前致謝。 安託
添加預期輸出到問題以及至少一個您嘗試的命令...我認爲這個問答有助於自己解決它https://stackoverflow.com/questions/17908555/printing- with-sed-or-awk-a-line-following-a-matching-pattern – Sundeep
或者像https://stackoverflow.com/questions/38972736/how-to-select-lines-between-two-patterns – Sundeep