Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-04-2010, 08:26 AM   #1
LQ Newbie
Registered: May 2010
Location: Bologna
Distribution: ubuntu lucid
Posts: 1

Rep: Reputation: 0
Smile Editing html files generated by mrtg

hello , i'm using mrtg to generate html files. With mrtg , i use indexmaker . Inside html files , i have found some html tag like "<SMALL>some text</SMALL>".

There is the manner to delete text inside two tags ? With bash script ??

Thank's lot
Old 05-04-2010, 08:47 AM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
This will only work if the tags are on the same line:
sed 's/<SMALL>[^<]*<\/SMALL>/<SMALL><\/SMALL>/g' file >newfile

Otherwise you will need to add more sed commands to handle each possible situation. You might want to read up on regular expressions. Sed, Awk and Perl use them extensively and they can be very picky.


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
Very Newbie question, My system generated email are not being formatted in HTML dcarnold56 Linux - Server 1 01-20-2009 01:25 PM
editing HTML files - the tedious way noir911 Linux - Desktop 5 11-07-2008 12:21 AM
editing multiple html files at once phantom_cyph Linux - Software 11 02-28-2008 12:08 AM
is there an html editor with remote files editing capabilities? odysseus.lost Linux - Software 2 06-16-2005 08:23 AM
Cookie Sharing Between CGI generated HTML pages and standard HTML pages rkwhited Linux - Newbie 5 08-15-2004 08:39 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:32 AM.

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