我有一个如下所示的模式。我正在尝试提取多行记录(从 Dr Group Name 到第一个空白行)。我试过了:
awk 'BEGIN{RS="\n" } /DR Group Name: \\Data Replication\\mc_wtec_1/,/\n/'
但它让我获得了所有四张唱片。
Storage WWN: 50001FE15007DBA0
DR Group Name: \Data Replication\mc_wtec_1
WWID list:
600508B4001078FD0002400001800000
DR Group Name: \Data Replication\vanilla_dr
WWID list:
600508B4001078F10002400002D20000
Storage WWN: 50001FE15007DBD0
DR Group Name: \Data Replication\mc_wtec_1
WWID list:
600508B4001078FD0002400001800000
DR Group Name: \Data Replication\vanilla_dr
WWID list:
600508B4001078F10002400002D20000