Help required with a bash script

welcome to the community, @vicky786.
Please use markdown code tags when posting code/data sample - you can get the specifics in the forum's welcome page here.
I've edited your OP to show the expected formatting, but please do so going forward.

It would help to have a small representative sample of your input AND the desired output based on the provided input.