How to use the shell to delete excess characters conditionally?
I don't know if this can be done with simple Unix commands to implement it. Because it looks a bit complicated.
I have a text that looks like the following.
<p id="mt">Iusto, numquam dolore aut voluptates delectus</p>
<p id="mt">Lorem ipsum dolor sit amet</p>
<p id="mt">Facere vitae sapiente necessitatibus</p>
<p id="mt">Tempora modi rem reprehenderit quam eos. Provident, animi ab ducimus dolorem</p>
Each line has different character lengths, and some content is too long and requires omission of excess portions.
For example, limit the `<p id="mt">...</p>` content to 20 characters and delete them if you go beyond that. It looks like this.
<p id="mt">Iusto, numquam dolor</p>
<p id="mt">Lorem ipsum dolor si</p>
<p id="mt">Facere vitae sapient</p>
<p id="mt">Tempora modi rem rep</p>