I have a text file where I have to add tags (in the form of normal text) to a .txt file.
For example, suppose I have a text file like this:
a
b
c
d
e
f
g
h
I want to add the tags <hello>
and </hello>
before and after every 3 rows, respectively, and make it look somewhat like this:
<hello>
a
b
c
</hello>
<hello>
d
e
f
</hello>
<hello>
g
h
</hello>
How can I achieve this?