LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-09-2010, 08:33 AM   #1
ministeren
LQ Newbie
 
Registered: Aug 2009
Posts: 6

Rep: Reputation: 0
Cool Convert HTML to ASCII


Hi guys. I have a little question .

i have made the following script:

#!/bin/bash
wget -r --user=chris --password=chris http://server1/logs.html
cd /root/chris/server1
firefox logs.html

the script copies and firefox it and show this as HTML and it works for me.

But how can i make it show me the output as ASCII text and not HTML ?.
i have tryied to pipe it out to LESS and MORE without firefoxing it, but it doesnt work for me.

Thanks in advance gents.

//Chris
 
Old 06-09-2010, 08:50 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I think you mean show it as plain text. Even the html is being encoded as ascii. You need an "html to text converter" (which of course is what a browser is......)

Have you searched on Google?

Or maybe "man -k html"
 
Old 06-09-2010, 09:09 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

You can use lynx to dump the URL into ascii:
Code:
lynx -dump -auth=chris:chris http://server1/logs.html > logs.txt
Regards
 
1 members found this post helpful.
Old 06-09-2010, 03:40 PM   #4
CoderMan
Member
 
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375
Blog Entries: 24

Rep: Reputation: 43
Or just display it using the links text-only web browser:

Code:
links log.html
Might need to install links first.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GNU program to do HTML to ASCII conversion? stf92 Linux - Software 4 08-07-2009 07:01 AM
Converting html to ascii? stf92 Linux - Software 11 05-28-2009 11:09 AM
how to convert text(html) back to html. d1l2w3 Linux - Software 4 04-08-2005 08:16 PM
function in shell to convert hexadecimal into ascii suchi_s Linux - Software 1 04-01-2005 02:07 PM
convert integers to ascii raven Programming 3 02-15-2002 03:32 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:16 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration