之间线路有人建议,如果我有一个像阅读两个关键字
*System_Power
1
1.2
1.8
2
*System_Terminate
在这种情况下,两个关键词之间的阅读做什么asnwer将
1
1.2
1.8
2
我试着用AWK像
awk '$0 =="*System_Power" # start printing when 1st field is *System_Power
$0 != "*System_Terminate"{ # until reach the *System_Terminate
print; } ' powerSummary > reportedFailure.k # Read from file powerSummary and pipe to reportedFailure.k
exit
其中上述数据位于文件powerSummary中间的某处。
我会感谢您的更正。
它为我工作,但我无法找到一个一般的行为方式。每次我都会得到一种很难消化的新解决方案。试图得到它。 – 2012-02-17 08:04:57