Sponsored Content
Top Forums Shell Programming and Scripting Remove external urls from .html file Post 302497537 by CowCow339 on Thursday 17th of February 2011 01:27:57 PM
Old 02-17-2011
Sorry, it's a little hard because the site doesn't want me to include html tags.

Input: I mistyped link & img so that the forum would allow me to put tags
<linkk rel="stylesheet" type="text/css" href="localFolder/my.css"> <linkk rel="stylesheet" type="text/css" href="http://www.noob.com">
<imgg src="localFolder/sad.jpg"> <imgg src="htp://www.noob.com/sad.jpg">
<aa href="http://www.google.com">

Output:
<linkk rel="stylesheet" type="text/css" href="localFolder/my.css">
<imgg src="localFolder/sad.jpg">
<aa href="http://www.google.com">


----------
Essentially, I want to remove everything between < > if there is an http inside the < >, except for <a href>

Last edited by CowCow339; 02-17-2011 at 02:33 PM..
 

10 More Discussions You Might Find Interesting

1. Linux

How to remove only html tags inside a file?

Hi All, I have following example file i want to remove all html tags only, Input File: <html> <head> <title>Software Solutions Inc., </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor=white leftmargin="0" topmargin="0"... (2 Replies)
Discussion started by: btech_raju
2 Replies

2. Solaris

Unix command to remove external SCSI harddrive

Hi All, I have an external scsi harddrive (HD) connected directly to the workstation. I understand when the external HD is connected and turned on, and type in "devfsadm" command. Unix will detect it but not mount the drive. So by typing in "format" command it will display the following: #... (6 Replies)
Discussion started by: tlee
6 Replies

3. Shell Programming and Scripting

Rsync to an external list of URLs

I'm going to have a text file formatted something like this: some_name http://www.someurl.com/ another_name http://www.anotherurl.com/ third_name http://www.thirdurl.com/ I need to write a script that can rsync from a file path I'll set, to each URL in the list. Any ideas? (8 Replies)
Discussion started by: ibsen
8 Replies

4. Shell Programming and Scripting

Extract URLs from HTML code using sed

Hello, i try to extract urls from google-search-results, but i have problem with sed filtering of html-code. what i wont is just list of urls thay apears between ........<p><a href=" and next following " in html code. here is my code, i use wget and pipelines to filtering. wget works, but... (13 Replies)
Discussion started by: L0rd
13 Replies

5. Web Development

Tricky mod_rewrite for clean urls problems when fetching external sources

Hi, I have problems with mod rewrite. I will try to describe... I want clean urls but fail to make it work propperly. Maybe I have problems, because the content displayed is fetched from my other site... There is a lot of stuff I already red about this, but somehow I can not find a solution... (2 Replies)
Discussion started by: lowmaster
2 Replies

6. Shell Programming and Scripting

Extract urls from index.html downloaded using wget

Hi, I need to basically get a list of all the tarballs located at uri I am currently doing a wget on urito get the index.html page Now this index page contains the list of uris that I want to use in my bash script. can someone please guide me ,. I am new to Linux and shell scripting. ... (5 Replies)
Discussion started by: mnanavati
5 Replies

7. Shell Programming and Scripting

How to remove urls from html files

Does anybody know how to remove all urls from html files? all urls are links with anchor texts in the form of <a href="http://www.anydomain.com">ANCHOR</a> they may start with www or not. Goal is to delete all urls and keep the ANCHOR text and if possible to change tags around anchor to... (2 Replies)
Discussion started by: georgi58
2 Replies

8. Shell Programming and Scripting

How to remove multiline HTML tags from a file?

I am trying to remove a multiline HTML tag and its contents from a few HTML files following the same basic pattern. So far using regex and sed have been unsuccessful. The HTML has a basic structure like this (with the normal HTML stuff around it): <div id="div1"> <div class="div2"> <other... (4 Replies)
Discussion started by: threesixtyfive
4 Replies

9. Shell Programming and Scripting

Sorting a html file with an external sort order

I am working on a web-concordance of Old Avestan and my concordance has produced a HTML file The sort deployed by the HTML file is not something which we normally use. I have tried my best to force a sort within the concordance itself, but the sort order does not work. I am giving below the sort... (6 Replies)
Discussion started by: gimley
6 Replies

10. UNIX for Beginners Questions & Answers

How to remove unused html codes from the file using UNIX?

Hi All, We have a HTML source which will be processed using a informatica workflow. In between these two we have a Unix script which transforms the file. We are getting an error from past week in the informatica saying invalid format, because the file has unused html reference (0-8,14-31 etc)... (2 Replies)
Discussion started by: karthik adiga
2 Replies
img-xbm(n)																img-xbm(n)

__________________________________________________________________________________________________________________________________________________

NAME
img-xbm - Img, X Windows Bitmap Format (xbm) SYNOPSIS
package require Tk package require img::xbm ?1.4? image create photo ?name? ?options? _________________________________________________________________ DESCRIPTION
The package img::xbm is a sub-package of Img. It can be loaded as a part of the complete Img support, via package require Img, or on its own, via package require img::xbm. Like all packages of Img it does not provide new commands, but extends the existing Tk command image so that it supports files containing raster images in the X Windows Bitmap Format (xbm). More specifically img::xbm extends Tk's photo image type. The name of the new format handler is xbm. This handler does not provide additional configuration options. All of the above means that in a call like image create photo ?name? ?options? [1] Image data in xbm format (options -data and -file) is detected automatically. [2] The format name xbm is recognized by the option -format. SEE ALSO
img-bmp, img-dted, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-raw, img-sgi, img-sun, img- tga, img-tiff, img-window, img-xbm, img-xpm KEYWORDS
image handling, tk, xbm COPYRIGHT
Copyright (c) 1995-2009 Jan Nijtmans <nijtmans@users.sourceforge.net> Img 1.4 img-xbm(n)
All times are GMT -4. The time now is 11:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy