LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 03-08-2010, 02:12 AM   #1
Kakarot_Rathish
Member
 
Registered: Sep 2008
Posts: 35
Blog Entries: 1

Rep: Reputation: 15
html2text >> a.txt creates the file but has extra characters in it


i'm trying to convert a html file into a text file
when i simply run "html2text <filename>" the output displayed is the way we want but when i redirect the same using "-o" or ">>" the file is having extra characters in it.
i even tried -ascii,but no much use.
Thanx in advance
 
Old 03-08-2010, 02:22 AM   #2
Kakarot_Rathish
Member
 
Registered: Sep 2008
Posts: 35
Blog Entries: 1

Original Poster
Rep: Reputation: 15
/////

[//secure.quantserve.com/pixel/p-25K88fxDSEn9Y.gif?tags=nww]





***** InfoWorld: Modernizing IT *****
***** JavaWorld: Solutions for Java Developers *****

[qt ] [Submit /includes/styles/i/but/lw- Advanced search
search-button.gif]


* Research Centers ////





the above part is bein displayed as the following in a file


////
*^H**^H**^H**^H**^H* _^HI^HI_^Hn^Hn_^Hf^Hf_^Ho^Ho_^HW^HW_^Ho^Ho_^Hr^Hr_^Hl^Hl_^Hd^Hd_^H:^H:_^H _^HM^HM_^Ho^Ho_^Hd^Hd_^He^He_^Hr^Hr_^Hn^Hn_^Hi^Hi_^Hz^Hz_^Hi^Hi_^Hn^Hn_^Hg^Hg_^H _^HI^HI_^HT^HT *^H**^H**^H**^H**^H*
*^H**^H**^H**^H**^H* _^HJ^HJ_^Ha^Ha_^Hv^Hv_^Ha^Ha_^HW^HW_^Ho^Ho_^Hr^Hr_^Hl^Hl_^Hd^Hd_^H:^H:_^H _^HS^HS_^Ho^Ho_^Hl^Hl_^Hu^Hu_^Ht^Ht_^Hi^Hi_^Ho^Ho_^Hn^Hn_^Hs^Hs_^H _^Hf^Hf_^Ho^Ho_^Hr^Hr_^H _^HJ^HJ_^Ha^Ha_^Hv^Hv_^Ha^Ha_^H _^HD^HD_^He^He_^Hv^Hv_^He^He_^Hl^Hl_^Ho^Ho_^Hp^Hp_^He^He_^Hr^Hr_^Hs^Hs *^H**^H**^H**^H**^H*

[qt ] [Submit /includes/styles/i/but/lw- _^HA_^Hd_^Hv_^Ha_^Hn_^Hc_^He_^Hd_^H _^Hs_^He_^Ha_^Hr_^Hc_^Hh
search-button.gif]


* _^HR_^He_^Hs_^He_^Ha_^Hr_^Hc_^Hh_^H _^HC_^He_^Hn_^Ht_^He_^Hr_^Hs
////
 
Old 03-08-2010, 02:28 AM   #3
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,769

Rep: Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283
Hi,

Why don't you use links (or lynx)
Code:
links -dump http://www.domain.com/whatever.html > whatever.txt
Regards
 
Old 03-08-2010, 03:23 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,176

Rep: Reputation: 2356Reputation: 2356Reputation: 2356Reputation: 2356Reputation: 2356Reputation: 2356Reputation: 2356Reputation: 2356Reputation: 2356Reputation: 2356Reputation: 2356
html2txt

This script, html2txt, actually uses lynx ..
Attached Files
File Type: txt html2txt.txt (3.0 KB, 11 views)
 
Old 03-08-2010, 05:01 AM   #5
Kakarot_Rathish
Member
 
Registered: Sep 2008
Posts: 35
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Thanks to all.
i used -nobs and -ascii as options and it converted successfully
thankyou :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ls > temp has extra characters djeikyb Linux - Newbie 3 03-30-2008 02:20 PM
aplay -l > message,txt creates empty file milindlokde Programming 5 06-24-2007 01:46 PM
How can read from file.txt C++ where can save this file(file.txt) to start reading sam_22 Programming 1 01-11-2007 05:11 PM
vim creates extra file (*.*~) on exit with :wq 18thBronzeman Linux - Desktop 2 12-19-2006 11:25 AM
strange characters when routing man page to txt file DJOtaku Linux - General 3 05-15-2005 01:03 AM


All times are GMT -5. The time now is 11:49 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration