Hi All ,
I am having a file as stated below
File 1
chain = chan6 group = grp0 input = '/pad_pc10' output = '/pad_pb7' length = 9900
chain = chan2 group = grp0 input = '/pad_pa4' output = '/pad_pb12' length = 10000
chain = chan7 group = grp0 input = '/pad_pb2' output = '/pad_pb15' length = 9754
chain = chan3 group = grp0 input = '/pad_pa0' output = '/pad_pb13' length = 10000
chain = chan4 group = grp0 input = '/pad_pb3' output = '/pad_pb10' length = 10000
chain = chan0 group = grp0 input = '/pad_pc0' output = '/pad_pb14' length = 9917
chain = chan5 group = grp0 input = '/pad_pb9' output = '/pad_pb11' length = 9994
chain = chan1 group = grp0 input = '/pad_pc1' output = '/pad_pa1' length = 10000
chain = CWG group = grp0 input = '/pad_pb0' output = '/pad_pb4' length = 97
I want to write a tcl script which will match the regexp output and then print only the output variables
OUTPUT file
'/pad_pc10'
'/pad_pa4'
'/pad_pb2'
'/pad_pa0'
'/pad_pb3'
'/pad_pc0'
'/pad_pb9'
'/pad_pc1'
'/pad_pb0'
I have tried to write below script but its not working
Pleas help me out
set fd [open "report" r]
while {[gets $fd line] >= 0} {
if {[regexp "output" $line match match1]} {
if {$match1 == 1} {
puts $line
}
}
}