![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| extract data from html tables | Streetrcr | UNIX for Dummies Questions & Answers | 8 | 03-20-2008 06:14 AM |
| coverting html data to text in 'c' | phani_sree | High Level Programming | 3 | 10-18-2007 10:06 AM |
| HTML message with attachment (text-file) | Felix2511 | UNIX for Dummies Questions & Answers | 2 | 09-12-2007 02:59 AM |
| html - text file question | frustrated1 | Shell Programming and Scripting | 5 | 09-21-2005 05:23 AM |
| linking unix generated text file to html page | alexd | Shell Programming and Scripting | 1 | 11-13-2002 12:21 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How do I extract text only from html file without HTML tag
I have a html file called myfile. If I simply put "cat myfile.html" in UNIX, it shows all the html tags like <a href=r/26><img src="http://www>. But I want to extract only text part.
Same problem happens in "type" command in MS-DOS. I know you can do it by opening it in Internet Explorer, then "save as text", then open it again. But I need to do this from UNIX, as I have thousands of html files and have no time to convert them to text files one by one. I went through many books, but can't find a way. I would really appreciate your help. |
|
||||
|
Use Lynx with the --dump option, like this:
lynx --dump myfile.html > myfile.txt OR lynx --dump http://some.where.com/whatever.html > myfile.txt You can write a shell script that will do this for many files without you having to touch it. |
|
||||
|
Quote:
i can not get the lynx command on linux. what should i do? |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|