Sponsored Content
Top Forums Shell Programming and Scripting Extract URL from RSS Feed in AWK Post 302449047 by kurumi on Saturday 28th of August 2010 04:06:34 AM
Old 08-28-2010
Code:
#!/bin/bash
exec 6<"file"
while read -r LINE<&6
do
  case "$LINE" in
   *xmlUrl*)
      LINE=${LINE##*xmlUrl=\"}
      echo ${LINE%%\" *};;
  esac
done
exec 6<&-

 

6 More Discussions You Might Find Interesting

1. What is on Your Mind?

Post Your Favorite UNIX/Linux Related RSS Feed Links

Hello, I am planning to revise the RSS News subforum areas, here: News, Links, Events and Announcements - The UNIX Forums ... maybe with a subforum for each OS specific news, like HP-UX, Solaris, RedHat, OSX, etc. RSS subforums.... Please post your favorite OS specific RSS (RSS2) link... (0 Replies)
Discussion started by: Neo
0 Replies

2. Shell Programming and Scripting

replace last form feed with line feed

Hi I have a file with lots of line feeds and form feeds (page break). Need to replace last occurrence of form feed (created by - echo "\f" ) in the file with line feed. Please advise how can i achieve this. TIA Prvn (5 Replies)
Discussion started by: prvnrk
5 Replies

3. Shell Programming and Scripting

SED extract url - please help a lamer

Hello everybody. I have lines that looks something like this: <done16=""118"" done18=""$ title=""thisisatitle"" href=""/JoeBanana" alt=""Joe""><done16=""118"" done18=""$ title=""thisisatitle"" href=""/GeraldGiraffe" alt=""Gerald""> What kind of SED command would I need to use to extract... (4 Replies)
Discussion started by: digi
4 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

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
XML::Feed::Entry(3pm)					User Contributed Perl Documentation				     XML::Feed::Entry(3pm)

NAME
XML::Feed::Entry - Entry/item in a syndication feed SYNOPSIS
## $feed is an XML::Feed object. for my $entry ($feed->entries) { print $entry->title, " ", $entry->summary, " "; } DESCRIPTION
XML::Feed::Entry represents an entry/item in an XML::Feed syndication feed. USAGE
XML::Feed::Entry->new($format) Creates a new XML::Feed::Entry object in the format $format, which should be either RSS or Atom. $entry->convert($format) Converts the XML::Feed::Entry object into the $format format, and returns the new object. $entry->title([ $title ]) The title of the entry. $entry->base([ $base ]) The url base of the entry. $entry->link([ $uri ]) The permalink of the entry, in most cases, except in cases where it points instead to an offsite URI referenced in the entry. $entry->content([ $content ]) An XML::Feed::Content object representing the full entry body, or as much as is available in the feed. In RSS feeds, this method will look first for <http://purl.org/rss/1.0/modules/content/#encoded> and <http://www.w3.org/1999/xhtml#body> elements, then fall back to a <description> element. $entry->summary([ $summary ]) An XML::Feed::Content object representing a short summary of the entry. Possibly. Since RSS feeds do not have the idea of a summary separate from the entry body, this may not always be what you want. If the entry contains both a <description> element and another element typically used for the full content of the entry--either http://www.w3.org/1999/xhtml/body or <http://purl.org/rss/1.0/modules/content/#encoded>--we treat that as the summary. Otherwise, we assume that there isn't a summary, and return an XML::Feed::Content object with an empty string in the body. $entry->category([ $category ]) The category in which the entry was posted. Returns a list of categories if called in array context or the first category if called in scalar context. WARNING It's possible this API might change to have an add_category instead. $entry->tags([ $tag ]) A synonym (alias) for category; $entry->author([ $author ]) The name or email address of the person who posted the entry. $entry->id([ $id ]) The unique ID of the entry. $entry->issued([ $issued ]) A DateTime object representing the date and time at which the entry was posted. If present, $issued should be a DateTime object. $entry->modified([ $modified ]) A DateTime object representing the last-modified date of the entry. If present, $modified should be a DateTime object. $entry->wrap Take an entry in its native format and turn it into an XML::Feed::Entry object. $entry->unwrap Take an XML::Feed::Entry object and turn it into its native format. AUTHOR &; COPYRIGHT Please see the XML::Feed manpage for author, copyright, and license information. perl v5.14.2 2012-03-21 XML::Feed::Entry(3pm)
All times are GMT -4. The time now is 06:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy