Sponsored Content
Top Forums Shell Programming and Scripting To extract <P> tags in a custom manner from below mentioned input. Post 302274945 by Ikon on Thursday 8th of January 2009 05:50:42 PM
Old 01-08-2009
Not exatally what you want but might get you started.

This will remove html tags.

Code:
 sed -e :a -e 's/<[^>]*>//g;/</N;//ba' myfile

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extract/select pattern from input

Hey, examples of the input (text line): /bla/blMOasdn234.adanif24/blabla.rar /bla/blMOasdn234.adanif24/blabla23124.bin /bla/bla/bla/bla/bla/bla.bin and what I need to do is extract/select only the dir path so the output would be: /bla/blMOasdn234.adanif24/ /bla/blMOasdn234.adanif24/... (4 Replies)
Discussion started by: TehOne
4 Replies

2. Shell Programming and Scripting

Please help: Extract filtered output from following input

Following is input: <P align="justify" ><FONT size="+1" color="#221E1F">the tiny bundles of hairs that protrude from them. Waves in the fluid of the inner ear stimulate the hair cells. Like the rods and cones in the eye, the hair cells convert this physical stimulation into neural im<FONT... (1 Reply)
Discussion started by: parshant_bvcoe
1 Replies

3. Emergency UNIX and Linux Support

Appending the contents of two files in computational manner

Hi, I have two files say file 1 file 2 File1 1 2 4 5 File 2 asdf adf How to get the ouput something like asdf1 adf1 asdf2 adf2 asdf4 adf4 asdf5 (5 Replies)
Discussion started by: ecearund
5 Replies

4. Shell Programming and Scripting

Extract the lines from input file

This is the sample input file b 05/Jul/2010:07:00:10 a 05/Jul/2010:06:00:10 b 05/Jul/2010:07:00:10 c 05/Jul/2010:07:10:10 d 05/Jul/2010:08:00:10 e 05/Jul/2010:09:00:10 f 05/Jul/2010:10:00:10 h 05/Jul/2010:11:00:10 i 05/Jul/2010:12:00:10 j ... (9 Replies)
Discussion started by: sandy1028
9 Replies

5. UNIX and Linux Applications

How to log out of the server in such a manner that you are not logged out of PUTTY?

Hi, I am using EXIT command to log out of the server, But this logs me out of the Putty. Is there any way that I can still be present on Putty and just log out of the server. Every time I have to open a new session of PUTTY for a new server (3 Replies)
Discussion started by: himvat
3 Replies

6. UNIX for Dummies Questions & Answers

Need to extract name from input

:confused:Hi All, I have created a common shell scripts which accepts 1 input variable which has the name of the datafile(v3_pcr2ecm_wkly_mainbase_maps_20120228.txt) and this name of the datafile keeps changing. I need to remove .txt extension and create a new log file as... (2 Replies)
Discussion started by: abhi_123
2 Replies

7. Shell Programming and Scripting

Extract data according to keys from filename mentioned in file

Hello experts, I want to join a file with files whosE names are mentioned in one of the columns of the same file. File 1 t1,a,b,file number 1 t1,a,c,file number 1 t2,c,d,file number 2 t2,c,e,file number 2 t2,c,f,file number 2 t2,c,g,file number 2 t3,e,f,file number 3 file number 1... (3 Replies)
Discussion started by: ritakadm
3 Replies

8. Shell Programming and Scripting

Script execution in sequence manner

Hi guys, I am building a parent script which will call three scripts internally and i would like to run them in sequence manner, i.e. once previous script is successful then only i need to proceed with next else need to fail. I am running in bash mode and flavour is sun main_script.sh sh... (8 Replies)
Discussion started by: Master_Mind
8 Replies

9. Shell Programming and Scripting

Bash to extract file prefix and from input to use in output

In the bash below which does execute I am trying to extract the contents of ${id} is 1234, as ${id} stores the variable that changes each time. After the path is removed the contents of ${id} are stored in pref, so they can be used in the output. Currently I am not able to extract the 1234 in the... (6 Replies)
Discussion started by: cmccabe
6 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 03:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy