Hi Experts,
Anybody out there figure out on how to achieve in shell scripts or tools. I have done googling to find solutions but no luck.
I have thousands of .txt files to batch process, please see the below sample text content after -------- start here --------. What I want to achieve is to insert html tags to format my content and rename .txt to html.
PS: and heres the tags: <p align="center"> </p> and <p align="justify"> </p>
Thanks
tags should insert from start and end of paragraph. insert Tags:
and html files should look exactly like this:
Sample inside .txt files
Republic of the Country
Country Name v. Rodrigo, 19 C.N. 120494 (14875721)
Country Name v. Rodrigo
120494 C.N. 14875721
ON DIVISION OF OPINION OF THE JUDGES
OF THE DISTRICT COURT OF COUTRHR
Uniquerow
0The Quick Brown fox jumps over the lazy dog near the bank of the river. The Quick Brown fox jumps over the lazy dog near
fox jumps over the lazy dog near the bank of the river. The Quick Brown fox jumps over the lazy dog near the bank of the river.
he lazy dog near the bank of the river. The Quick Brown fox jumps over the lazy dog near the bank of the river.
Page 120494 C.N. 14875721
1The Quick Brown fox jumps over the lazy dog near the bank of the river. The Quick Brown fox jumps over the
fox jumps over the lazy dog near the bank of the river. The Quick Brown fox jumps over the lazy dog near the bank of the river.
he lazy dog near the bank of the river. The Quick Brown fox jumps over the lazy dog near the bank of the river.
Page 120494 C.N. 14875722
2The Quick Brown fox jumps over the lazy dog near the bank of the river. The Quick Brown fox jumps over the lazy dog near the bank of the river.
fox jumps over the lazy dog near the bank of the river. The Quick Brown fox jumps over the lazy dog near the bank of the river.
he lazy dog near the bank of the river. The Quick Brown fox jumps over the lazy dog near the bank of the river.
Page 120494 C.N. 14875723
This will looks like this:
<p align="center"> Republic of the Country </p>
<p align="center"> Country Name v. Rodrigo, 19 C.N. 120494 (14875721) </p>
<p align="center"> Country Name v. Rodrigo </p>
<p align="center"> 120494 C.N. 14875721 </p>
<p align="center"> ON DIVISION OF OPINION OF THE JUDGES </p>
<p align="justify"> OF THE DISTRICT COURT OF COUTRHR </p>
<p align="justify"> Uniquerow </p>
<p align="justify"> 0The Quick Brown fox jumps over the lazy dog near the bank of the river. The Quick Brown fox jumps over the lazy dog near
fox jumps over the lazy dog near the bank of the river. The Quick Brown fox jumps over the lazy dog near the bank of the river.
he lazy dog near the bank of the river. The Quick Brown fox jumps over the lazy dog near the bank of the river. </p>
<p align="justify"> Page 120494 C.N. 14875721 </p>
<p align="justify"> 1The Quick Brown fox jumps over the lazy dog near the bank of the river. The Quick Brown fox jumps over the
fox jumps over the lazy dog near the bank of the river. The Quick Brown fox jumps over the lazy dog near the bank of the river.
he lazy dog near the bank of the river. The Quick Brown fox jumps over the lazy dog near the bank of the river. </p>
<p align="justify"> Page 120494 C.N. 14875722 </p>
<p align="justify"> 2The Quick Brown fox jumps over the lazy dog near the bank of the river. The Quick Brown fox jumps over the lazy dog near the bank of the river.
fox jumps over the lazy dog near the bank of the river. The Quick Brown fox jumps over the lazy dog near the bank of the river.
he lazy dog near the bank of the river. The Quick Brown fox jumps over the lazy dog near the bank of the river. </p>
<p align="justify"> Page 120494 C.N. 14875723 </p>