How to extract a record in a text on string match in a file using bash
- by private
Hi I have a text file sample.txt as
=====record1
title:javabook
price:$120
author:john
path:d:
=====record2
title:.netbook
author:paul
path:f:
=====record3
author:john
title:phpbook
subject:php
path:f:
price:$150
=====record4
title:phpbook
subject:php
path:f:
price:$150
from this I want to split the data based on author, it should split into 2…