LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-04-2010, 07:26 AM   #1
abonetti67
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, 07:47 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
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.
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:20 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration