Lets say I have a file called sample.txt which contains abbcacgrep -E ^b|c$ sample.txt gives me output asbcacNow  I want the filter string to be added to the output.I want the output asbc,bac,cHow can I achieve this ?
append the matched text to the line
grep