so I have a file, and there is a string that I want to highlight by put a marker line above it. I can do this easily enough with sed:

```
cat flog.txt |sed '/foo/ i===========B' >t.lis

```

this works fine, as I have a file that looks like this now

```

===========B
blablabla foo blabla bla
bla bla bla
===========B
blablabla foo blabla bla
bla bla bla
bla bla bla 
===========B
blablabla foo blabla bla
bla bla bla
===========B
blablabla foo blabla bla
bla bla bla

```

however I want the "=========B" line to have a count 1, 2, 3, etc. so the file looks like this instead:

```

===========B 1
blablabla foo blabla bla
bla bla bla
===========B 2
blablabla foo blabla bla
bla bla bla
bla bla bla 
===========B 3
blablabla foo blabla bla
bla bla bla
===========B 4
blablabla foo blabla bla
bla bla bla

```

and so on, can anybody help?

thanks,