Sponsored Content
Top Forums Shell Programming and Scripting SED extract url - please help a lamer Post 302345282 by digi on Tuesday 18th of August 2009 08:37:10 PM
Old 08-18-2009
hey edidataguy

You're my hero. That did it. Thanks !
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help needed using sed to replace a url in 1000's of web pages

Hi, I'm new to scripting. I understand the concepts and syntax of some commands but have difficulty with others and combining actions to achieve what I'm trying to do so hope someone on here can help. A long while back I inherited a website with 1000's of pages most of which were created by a... (2 Replies)
Discussion started by: bob_from_brid
2 Replies

2. Shell Programming and Scripting

stripping http and https from a url using sed

I have to write a sed script which removes http and https from a URL. So if a URL is https://www.example.com or Example Web Page, script should return me Example Web Page i tried echo $url | sed 's|^http://||g'. It doesn't work. Please help (4 Replies)
Discussion started by: vickylife
4 Replies

3. Shell Programming and Scripting

Extract URL from RSS Feed in AWK

Hi, I have following data file; <outline title="Matt Cutts" type="rss" version="RSS" xmlUrl="http://www.mattcutts.com/blog/feed/" htmlUrl="http://www.mattcutts.com/blog"/> <outline title="Stone" text="Stone" type="rss" version="RSS" xmlUrl="http://feeds.feedburner.com/STC-Art"... (8 Replies)
Discussion started by: fahdmirza
8 Replies

4. Shell Programming and Scripting

How to extract url from html page?

for example, I have an html file, contain <a href="http://awebsite" id="awebsite" class="first">website</a>and sometime a line contains more then one link, for example <a href="http://awebsite" id="awebsite" class="first">website</a><a href="http://bwebsite" id="bwebsite"... (36 Replies)
Discussion started by: 14th
36 Replies

5. UNIX for Dummies Questions & Answers

Awk: print all URL addresses between iframe tags without repeating an already printed URL

Here is what I have so far: find . -name "*php*" -or -name "*htm*" | xargs grep -i iframe | awk -F'"' '/<iframe*/{gsub(/.\*iframe>/,"\"");print $2}' Here is an example content of a PHP or HTM(HTML) file: <iframe src="http://ADDRESS_1/?click=5BBB08\" width=1 height=1... (18 Replies)
Discussion started by: striker4o
18 Replies

6. Shell Programming and Scripting

Downloading of dynamically generated URL using curl and sed

I've been attempting to use curl and sed to allow for downloading a file from a dynamically generated URL. I've been able to retrieve and save the HTML of the page that does the dynamic generation of the download URL using curl but I'm very new to sed and I seem to be stuck at this part. HTML: ... (1 Reply)
Discussion started by: schwein
1 Replies

7. Shell Programming and Scripting

How to use GREP to extract URL from file

Hi All , Here is what I want to do: Given a line: 98.70.217.222 - - "GET /liveupdate-aka.symantec.com/1340071490jtun_nav2k8enn09m25.m25?h=abcdefgh HTTP/1.1" 200 159229484 "-" "hBU1OhDsPXknMepDBJNScBj4BQcmUz5TwAAAAA" "-" 1. Get the URL component: ... (2 Replies)
Discussion started by: Naks_Sh10
2 Replies

8. Shell Programming and Scripting

Extract values from multi lined url source

Hello, I want extract multi values from multi url source to a csv text. Thank you very much for help. my curl code : curl "http://www.web.com/cities//city.html Source code: div class="clear"></div> <table class="listing-details"> <tr> ... (1 Reply)
Discussion started by: hoo
1 Replies

9. Shell Programming and Scripting

Replace URL using sed

Original Line {background-image:url('http://www.myoldhost.com/images/scds/tsp3.png');} Expected {background-image:url('http://www.mynewhost.com/nndn/hddh/ccdcd.png');} I am using following syntax STATIC_HOST_TEMP="http://myhost.com/temp/xyx.png" $sed -e... (1 Reply)
Discussion started by: 8055
1 Replies

10. Shell Programming and Scripting

Url encoding a string using sed

Hi I was hoping some one would know if it is possible to url encode a string using sed? My problem is I have extracted some key value pairs from a text file with sed, and will be inserting these pairs as source variables into a curl script to automatically download some xml from our server. My... (5 Replies)
Discussion started by: Paul Walker
5 Replies
Class::Meta::Attribute(3pm)				User Contributed Perl Documentation			       Class::Meta::Attribute(3pm)

NAME
Class::Meta::Attribute - Class::Meta class attribute introspection SYNOPSIS
# Assuming MyApp::Thingy was generated by Class::Meta. my $class = MyApp::Thingy->my_class; my $thingy = MyApp::Thingy->new; print " Attributes: "; for my $attr ($class->attributes) { print " o ", $attr->name, " => ", $attr->get($thingy), $/; if ($attr->authz >= Class::Meta::SET && $attr->type eq 'string') { $attr->get($thingy, 'hey there!'); print " Changed to: ", $attr->get($thingy) $/; } } DESCRIPTION
An object of this class describes an attribute of a class created by Class::Meta. It includes meta data such as the name of the attribute, its data type, its accessibility, and whether or not a value is required. It also provides methods to easily get and set the value of the attribute for a given instance of the class. Class::Meta::Attribute objects are created by Class::Meta; they are never instantiated directly in client code. To access the attribute objects for a Class::Meta-generated class, simply call its "my_class()" method to retrieve its Class::Meta::Class object, and then call the "attributes()" method on the Class::Meta::Class object. INTERFACE
Constructors new A protected method for constructing a Class::Meta::Attribute object. Do not call this method directly; Call the "add_attribute()" method on a Class::Meta object, instead. Instance Methods name my $name = $attr->name; Returns the name of the attribute. type my $type = $attr->type; Returns the name of the attribute's data type. Typical values are "scalar", "string", and "boolean". See Class::Meta for a complete list. is if ($attr->is('string')) { # ... } A convenience method for "$attr->type eq $type". desc my $desc = $attr->desc; Returns a description of the attribute. label my $label = $attr->label; Returns a label for the attribute, suitable for use in a user interface. It is distinguished from the attribute name, which functions to name the accessor methods for the attribute. required my $req = $attr->required; Indicates if the attribute is required to have a value. once my $once = $attr->once; Indicates whether an attribute value can be set to a defined value only once. package my $package = $attr->package; Returns the package name of the class that attribute is associated with. view my $view = $attr->view; Returns the view of the attribute, reflecting its visibility. The possible values are defined by the following constants: Class::Meta::PUBLIC Class::Meta::PRIVATE Class::Meta::TRUSTED Class::Meta::PROTECTED context my $context = $attr->context; Returns the context of the attribute, essentially whether it is a class or object attribute. The possible values are defined by the following constants: Class::Meta::CLASS Class::Meta::OBJECT authz my $authz = $attr->authz; Returns the authorization for the attribute, which determines whether it can be read or changed. The possible values are defined by the following constants: Class::Meta::READ Class::Meta::WRITE Class::Meta::RDWR Class::Meta::NONE class my $class = $attr->class; Returns the Class::Meta::Class object that this attribute is associated with. Note that this object will always represent the class in which the attribute is defined, and not any of its subclasses. default my $default = $attr->default; Returns the default value for a new instance of this attribute. Since the default value can be determined dynamically, the value returned by "default()" may change on subsequent calls. It all depends on what was passed for the "default" parameter in the call to "add_attribute()" on the Class::Meta object that generated the class. get my $value = $attr->get($thingy); This method calls the "get" accessor method on the object passed as the sole argument and returns the value of the attribute for that object. Note that it uses a "goto" to execute the accessor, so the call to "set()" itself will not appear in a call stack trace. set $attr->set($thingy, $new_value); This method calls the "set" accessor method on the object passed as the first argument and passes any remaining arguments to assign a new value to the attribute for that object. Note that it uses a "goto" to execute the accessor, so the call to "set()" itself will not appear in a call stack trace. build $attr->build($class); This is a protected method, designed to be called only by the Class::Meta class or a subclass of Class::Meta. It takes a single argument, the Class::Meta::Class object for the class in which the attribute was defined, and generates attribute accessors by calling out to the "make_attr_get()" and "make_attr_set()" methods of Class::Meta::Type as appropriate for the Class::Meta::Attribute object. Although you should never call this method directly, subclasses of Class::Meta::Constructor may need to override its behavior. SUPPORT
This module is stored in an open GitHub repository <http://github.com/theory/class-meta/>. Feel free to fork and contribute! Please file bug reports via GitHub Issues <http://github.com/theory/class-meta/issues/> or by sending mail to bug-Class-Meta.cpan.org <mailto:bug-Class-Meta.cpan.org>. AUTHOR
David E. Wheeler <david@justatheory.com> SEE ALSO
Other classes of interest within the Class::Meta distribution include: Class::Meta Class::Meta::Class Class::Meta::Method Class::Meta::Constructor Class::Meta::Type COPYRIGHT AND LICENSE
Copyright (c) 2002-2011, David E. Wheeler. Some Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2011-08-06 Class::Meta::Attribute(3pm)
All times are GMT -4. The time now is 07:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy