I have some input, which containes some entries which are comma separated. Eg.
a,b,id=999],d
d,f,g,id=345],x
x,y,x,s,id=677],y
I run a loop to read the lines one by one. What i want is to extract the value on the right of id=. I cannnot do it by Awk, since the column number is not fixed. So what i need is to first search and match “id=” pattern, and then print the number following it, until ‘]’ is encountered.
Any way to do this?
Help will be very much appreciated.