dear stackoverflower,
i have project collecting data log file, , want collect data if line above match condition
for example, log data :
a1/apt "msbna1 013/088/" 341 130510 1756 h'0000-dba4 m3ua destination inaccessible a1/apt "msbna1 013/088/" 722 130702 1644 h'0000-2e2b event reporting threshold reached a1/apt "msjam2 106/00/0" 018 130118 0137 h'0000-001b blade source cp 02 m3ua destination inaccessible a1/apt "msjam2 106/00/0" 020 130227 1144 h'0000-001e blade source cp 10 m3ua destination inaccessible
i want print out using condition :
-if line a1/apt... , source... print line below
-if line below blade, no need print
initially use command :
grep -a 1 a1 [file name]
but work a1/apt line only, not source
any guys appreciate, thank much
Comments
Post a Comment