hi,
i have one file. it contains fields like this
i/p files :
a.txt
9842,5003,a,a,100
9942,5003,a,a,100
9852,5003,a,a,100
98456,5003,a,a,100
9742,5003,a,a,100
b.txt
7842,5003,a,a,100
7942,5003,a,a,100
7852,5003,a,a,100
98456,5003,a,a,100
7742,5003,a,a,100
c.txt
8842,5003,a,a,100
9842,5003,a,a,100
8852,5003,a,a,100
88456,5003,a,a,100
8742,5003,a,a,100
Operation to be done: I need to grep particular lines in the above input file (a.txt,b.txt & c.txt) output lines should contain all fields and also the filname as last field
o/p format : say i grep lines starts with "9" means output will be needed in below format
9842,5003,a,a,100,a.txt
9942,5003,a,a,100,a.txt
9852,5003,a,a,100,a.txt
98456,5003,a,a,100,a.txt
9742,5003,a,a,100,a.txt
98456,5003,a,a,100,b.txt
9842,5003,a,a,100,c.txt