I have looked a lot to find the solution but could not find one. I know how to remove all tags using sed but I need to remove only those HTML tags that are empty or have just tabs or spaces in them and also remove tags explicitly. For example:
<p></p> or <p> </p>
I used the following command to remove all the HTML tags, it works properly but I don't want to remove all tags.
sed -e 's/<[^>]*>//g' myfile.html
same command is used here. Kindly help me out.