The contents of my file are as follows
<categories>Category 1, Category 2, Category 3</categories>
The number of categories varies.
I would like to run a search and replace command using grep pattern that will produce this result:
<categories>
<category>Category 1</category>
<category>Category 2</category>
<category>Category 3</category>
</categories>
awk solution