Article 4Y22N Keep specific text from a line in bash script

Keep specific text from a line in bash script

by
bmxakias
from LinuxQuestions.org on (#4Y22N)
Hello

I have a file (file.html) and i have inside a few lines using a pattern like:

Code:<td width="1%" nowrap="nowrap" align="right"><a href="/word-something/saf6059eb20/some-text-2015-web-710z-yts-lt" title="Super duper text (2015) [WEBfor] [532a] [YTR LT]"><img src="//images.some.info/dl_icon.png" alt="get..." width="28" height="21" border="0" align="absmiddle"></a></td>
<td width="1%" nowrap="nowrap" align="right"><a href="/word-something/s1a148a0a69/hello-of-a-blabla-1999-bit" title="Other nice text tha i will like to keep (5487) TREUsi"><img src="//images.some.info/dl_icon.png" alt="get..." width="28" height="21" border="0" align="absmiddle"></a></td>
<td width="1%" nowrap="nowrap" align="right"><a href="/word-something/s68ee3a70d3/bye-in-all-third-time-2067-5903f-amzn-web-ty-ddp2-1-h-245-ntu" title="A good one yes 1968 8731w AMDR WEB-TE DDU6 1 K 131-NTE"><img src="//images.some.info/dl_icon.png" alt="get..." width="28" height="21" border="0" align="absmiddle"></a></td>I would like to clean that file and keep only the titles like:

Quote:
Super duper text (2015) [WEBfor] [532a] [YTR LT]
Other nice text tha i will like to keep (5487) TREUsi
A good one yes 1968 8731w AMDR WEB-TE DDU6 1 K 131-NTE
on the same file or output to a new file...

Thank youlatest?d=yIl2AUoC8zA latest?i=mgOW8yPeNbc:d4z_7ABDMBE:F7zBnMy latest?i=mgOW8yPeNbc:d4z_7ABDMBE:V_sGLiP latest?d=qj6IDK7rITs latest?i=mgOW8yPeNbc:d4z_7ABDMBE:gIN9vFwmgOW8yPeNbc
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments