Sponsored Content
Top Forums Shell Programming and Scripting remove large portion of web page code between two tags Post 302632161 by georgi58 on Sunday 29th of April 2012 11:17:40 AM
Old 04-29-2012
remove large portion of web page code between two tags

Hi everybody,

I am trying to remove bunch of lines from web pages between two tags:
one is <h1> and the other is <table

it looks like

Code:
<h1>Anniversary cards roses</h1>
many
lines here
<table summary="Free anniversary greeting cards." cellspacing="8" cellpadding="8" width="70%">

my goal is to delete all including <h1> but keep untouched

Code:
<table summary="Free anniversary greeting cards" cellspacing="8" cellpadding="8" width="70%">

any help is greatly appreciated.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Web page hosting

I built my website based on Dreamweaver, on Windows platform. My server uses Unix, and the page doesn't look too good. Is there any way to solve this problem without too much of a headache? (1 Reply)
Discussion started by: PCL
1 Replies

2. Shell Programming and Scripting

remove portion of file

Can anyone tell me how to remove a portion of a large file to smaller ones? What I have is a large file that was created becasue several similar files were joined together. Each individual file starts with MSG_HEAD. I want to take everything from MSG_HEAD up to were it says MSG_HEAD again and... (13 Replies)
Discussion started by: methos
13 Replies

3. UNIX for Dummies Questions & Answers

Which comand to show the source code on a web page?

Hi folks! I am using MacOsX that runs freeBSD. Could you tell me what comand to type on the Unix Terminal to display on the terminal the source code of a certain web page? I think something like #<comand> http://www.apple.com will display on the terminal's window the html source code... (11 Replies)
Discussion started by: fundidor
11 Replies

4. Solaris

Page cache too large

I have a solaris10 box running a java application on it. Whenever the java app is used heavily, the amount of free memory decreases fairly rapidly. I believe I have eliminated the running applications from the culprit list. In the process I have found that the page cache is consuming about 20G... (4 Replies)
Discussion started by: timothy.edwards
4 Replies

5. AIX

amount of memory allocated to large page

We just set up a system to use large pages. I want to know if there is a command to see how much of the memory is being used for large pages. For example if we have a system with 8GB of RAm assigned and it has been set to use 4GB for large pages is there a command to show that 4GB of the *GB is... (1 Reply)
Discussion started by: daveisme
1 Replies

6. Shell Programming and Scripting

Extracting a portion of data from a very large tab delimited text file

Hi All I wanted to know how to effectively delete some columns in a large tab delimited file. I have a file that contains 5 columns and almost 100,000 rows 3456 f g t t 3456 g h 456 f h 4567 f g h z 345 f g 567 h j k lThis is a very large data file and tab delimited. I need... (2 Replies)
Discussion started by: Lucky Ali
2 Replies

7. Shell Programming and Scripting

Remove first portion of string

I have a script which currently uses a file containing a list of directories as an argument. The file is read in to an array, and then the array is iterated in a for loop. What I would like to do is cut off the first few directories of the directory path (they won't exist on the server where the... (5 Replies)
Discussion started by: msarro
5 Replies

8. Shell Programming and Scripting

Page Break in large file

Hi, The shell script inserting the millions of rows into target flat file system and handling the line number for each line. We need a page break line after every 10,000 lines. is there any command to insert a page break line into target file. (3 Replies)
Discussion started by: koti_rama
3 Replies

9. UNIX for Dummies Questions & Answers

Remove the date portion from file name

hi, I am trying to remove the last field before the period (.) from a list of file names in a directory in a shell script. Below is the list of file names. ENVID_archival_20120214092258.log ENVID_Get_Source_Files_20120214091828.log ENVID_Get_Source_Files_20120214092523.log... (6 Replies)
Discussion started by: Vijay81
6 Replies

10. What is on Your Mind?

Loading Animation for Large Man Page Repositories

Should have done this 10 years ago, so better late than never: Just added a "loading" animation to the the man page repositories when they load, especially since some are very large and take many seconds to load. See for example: https://www.unix.com/man-page-opensolaris-repository.php ... (1 Reply)
Discussion started by: Neo
1 Replies
HTML::Clean(3)						User Contributed Perl Documentation					    HTML::Clean(3)

NAME
HTML::Clean - Cleans up HTML code for web browsers, not humans SYNOPSIS
use HTML::Clean; $h = new HTML::Clean($filename); # or.. $h = new HTML::Clean($htmlcode); $h->compat(); $h->strip(); $data = $h->data(); print $$data; DESCRIPTION
The HTML::Clean module encapsulates a number of common techniques for minimizing the size of HTML files. You can typically save between 10% and 50% of the size of a HTML file using these methods. It provides the following features: Remove unneeded whitespace (begining of line, etc) Remove unneeded META elements. Remove HTML comments (except for styles, javascript and SSI) Replace tags with equivilant shorter tags (<strong> --> <b>) etc. The entire proces is configurable, so you can pick and choose what you want to clean. THE HTML
::Clean CLASS $h = new HTML::Clean($dataorfile, [$level]); This creates a new HTML::Clean object. A Prerequisite for all other functions in this module. The $dataorfile parameter supplies the input HTML, either a filename, or a reference to a scalar value holding the HTML, for example: $h = new HTML::Clean("/htdocs/index.html"); $html = "<strong>Hello!</strong>"; $h = new HTML::Clean($html); An optional 'level' parameter controls the level of optimization performed. Levels range from 1 to 9. Level 1 includes only simple fast optimizations. Level 9 includes all optimizations. $h->initialize($dataorfile) This function allows you to reinitialize the HTML data used by the current object. This is useful if you are processing many files. $dataorfile has the same usage as the new method. Return 0 for an error, 1 for success. $h->level([$level]) Get/set the optimization level. $level is a number from 1 to 9. $myref = $h->data() Returns the current HTML data as a scalar reference. strip(\%options); Removes excess space from HTML You can control the optimizations used by specifying them in the %options hash reference. The following options are recognized: boolean values (0 or 1 values) whitespace Remove excess whitespace shortertags <strong> -> <b>, etc.. blink No blink tags. contenttype Remove default contenttype. comments Remove excess comments. entities &quot; -> ", etc. dequote remove quotes from tag parameters where possible. defcolor recode colors in shorter form. (#ffffff -> white, etc.) javascript remove excess spaces and newlines in javascript code. htmldefaults remove default values for some html tags lowercasetags translate all HTML tags to lowercase parameterized values meta Takes a space separated list of meta tags to remove, default "GENERATOR FORMATTER" emptytags Takes a space separated list of tags to remove when there is no content between the start and end tag, like this: <b></b>. The default is 'b i font center' compat() This function improves the cross-platform compatibility of your HTML. Currently checks for the following problems: Insuring all IMG tags have ALT elements. Use of Arial, Futura, or Verdana as a font face. Positioning the <TITLE> tag immediately after the <head> tag. defrontpage(); This function converts pages created with Microsoft Frontpage to something a Unix server will understand a bit better. This function currently does the following: Converts Frontpage 'hit counters' into a unix specific format. Removes some frontpage specific html comments SEE ALSO
Modules FrontPage::Web, FrontPage::File Web Sites Distribution Site - http://people.itu.int/~lindner/ AUTHORS
Paul Lindner for the International Telecommunication Union (ITU) COPYRIGHT
The HTML::Strip module is Copyright (c) 1998,99 by the ITU, Geneva Switzerland. All rights reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. POD ERRORS
Hey! The above document had some coding errors, which are explained below: Around line 66: You forgot a '=back' before '=head2' Around line 658: =back without =over perl v5.12.1 2010-07-05 HTML::Clean(3)
All times are GMT -4. The time now is 05:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy