Sponsored Content
Top Forums Shell Programming and Scripting Script to select the rows from the feed file based on the input value provided Post 302893976 by punpun66 on Saturday 22nd of March 2014 03:40:21 PM
Old 03-22-2014
Wrench

Folks please advise can I save this command in a script file lets say named filesplitter.sh and set it's permission to 777 please advise so that last I will execute the file like sh filesplitter 861
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

select datas from an input file

I have a file containing a list of references and I want to run a script that will make the same action for each reference. The input file changes every hour, it's why I want to use a script that can read in a file, record by record, and run a specific action for the reference readed. Thanks... (1 Reply)
Discussion started by: dde
1 Replies

2. Shell Programming and Scripting

awk to select rows based on condition on column

I have got a file like this 003ABC00281020091005000100042.810001 ... (8 Replies)
Discussion started by: Maruti
8 Replies

3. Shell Programming and Scripting

delete rows in a file based on the rows of another file

I need to delete rows based on the number of lines in a different file, I have a piece of code with me working but when I merge with my C application, it doesnt work. sed '1,'\"`wc -l < /tmp/fileyyyy`\"'d' /tmp/fileA > /tmp/filexxxx Can anyone give me an alternate solution for the above (2 Replies)
Discussion started by: Muthuraj K
2 Replies

4. Shell Programming and Scripting

Change in Input feed based on condition file

Sorry Guys for not being able to explain in one of my earlier post. I am now putting my requirement with the input file and desired output file. In the below input file - Transaction code is at position 31:40. Business code is from position 318:321 TSCM00000005837 ... (7 Replies)
Discussion started by: varunrbs
7 Replies

5. UNIX for Dummies Questions & Answers

merging rows into new file based on rows and first column

I have 2 files, file01= 7 columns, row unknown (but few) file02= 7 columns, row unknown (but many) now I want to create an output with the first field that is shared in both of them and then subtract the results from the rest of the fields and print there e.g. file 01 James|0|50|25|10|50|30... (1 Reply)
Discussion started by: A-V
1 Replies

6. Shell Programming and Scripting

Select distinct rows in a file by last column

Hi, I have the following file: LOG:015608::ERR:2310:map_spsrec:Invalid parameter LOG:015608::ERR:2471:map_dgdrec:Invalid parameter LOG:015608::ERR:2487:map_nnmrec:Invalid number LOG:015608::ERR:2310:map_nmrec:Invalid number LOG:015608::ERR:2438:map_nmrec:Invalid number As a delimiter I... (2 Replies)
Discussion started by: apenkov
2 Replies

7. UNIX for Dummies Questions & Answers

Feed Input to a script running on bash

Hi Sir, I am just learning bash scripting and I came across a challenge. I need to input F11 to a script among many text inputs. For all the text inputs i did following. # sh test.sh < input.txt where input.txt contains all the text inputs in new lines. This worked fine until i... (1 Reply)
Discussion started by: gaurav kumar
1 Replies

8. UNIX for Dummies Questions & Answers

Select last update data based on file name

Hi All, I need to remove all files except the most update data based on date on filename Input data_AIDS_20150312.txt data_AIDS_20150311.txt data_AIDS_20150411.txt data_AIDS_20140312.txt the most updated data is data_AIDS_20150411.txt, so I'll remove other files. My expected output... (3 Replies)
Discussion started by: radius
3 Replies

9. Shell Programming and Scripting

Execute function as soon as input is provided in menu drive shell script

Hi All, I have a menu driven scripts. As you know while running the script we have to input the option such as 1,2, and 3 to execute function accordingly. but after selecting the input we have to press Enter. My requirement is to execute function as soon as we press the option. Is there... (5 Replies)
Discussion started by: kiran_j
5 Replies

10. UNIX for Beginners Questions & Answers

How to iterate Grep via all patterns provided in an input file?

When I use the following grep command with options -F and -f, its just displaying the text related to only the last pattern. Command: $ grep -f pattern_file.txt input_file.txt Output: doc-C2-16354 Even the following command yields the same output: Command: $ grep -Ff pattern_file.txt... (6 Replies)
Discussion started by: nsai
6 Replies
XML::Atom::Feed(3pm)					User Contributed Perl Documentation				      XML::Atom::Feed(3pm)

NAME
XML::Atom::Feed - Atom feed SYNOPSIS
use XML::Atom::Feed; use XML::Atom::Entry; my $feed = XML::Atom::Feed->new; $feed->title('My Weblog'); $feed->id('tag:example.com,2006:feed-id'); my $entry = XML::Atom::Entry->new; $entry->title('First Post'); $entry->id('tag:example.com,2006:entry-id'); $entry->content('Post Body'); $feed->add_entry($entry); $feed->add_entry($entry, { mode => 'insert' }); my @entries = $feed->entries; my $xml = $feed->as_xml; ## Get a list of the <link rel="..." /> tags in the feed. my $links = $feed->link; ## Find all of the Atom feeds on a given page, using auto-discovery. my @uris = XML::Atom::Feed->find_feeds('http://www.example.com/'); ## Use auto-discovery to load the first Atom feed on a given page. my $feed = XML::Atom::Feed->new(URI->new('http://www.example.com/')); USAGE
XML::Atom::Feed->new([ $stream ]) Creates a new feed object, and if $stream is supplied, fills it with the data specified by $stream. Automatically handles autodiscovery if $stream is a URI (see below). Returns the new XML::Atom::Feed object. On failure, returns "undef". $stream can be any one of the following: o Reference to a scalar This is treated as the XML body of the feed. o Scalar This is treated as the name of a file containing the feed XML. o Filehandle This is treated as an open filehandle from which the feed XML can be read. o URI object This is treated as a URI, and the feed XML will be retrieved from the URI. If the content type returned from fetching the content at URI is text/html, this method will automatically try to perform auto- discovery by looking for a <link> tag describing the feed URL. If such a URL is found, the feed XML will be automatically retrieved. If the URI is already of a feed, no auto-discovery is necessary, and the feed XML will be retrieved and parsed as normal. XML::Atom::Feed->find_feeds($uri) Given a URI $uri, use auto-discovery to find all of the Atom feeds linked from that page (using <link> tags). Returns a list of feed URIs. $feed->link If called in scalar context, returns an XML::Atom::Link object corresponding to the first <link> tag found in the feed. If called in list context, returns a list of XML::Atom::Link objects corresponding to all of the <link> tags found in the feed. $feed->add_link($link) Adds the link $link, which must be an XML::Atom::Link object, to the feed as a new <link> tag. For example: my $link = XML::Atom::Link->new; $link->type('text/html'); $link->rel('alternate'); $link->href('http://www.example.com/'); $feed->add_link($link); $feed->add_entry($entry) Adds the entry $entry, which must be an XML::Atom::Entry object, to the feed. If you want to add an entry before existent entries, you can pass optional hash reference containing "mode" value set to "insert". $feed->add_entry($entry, { mode => 'insert' }); $feed->entries Returns list of XML::Atom::Entry objects contained in the feed. $feed->language Returns the language of the feed, from xml:lang. $feed->author([ $author ]) Returns an XML::Atom::Person object representing the author of the entry, or "undef" if there is no author information present. If $author is supplied, it should be an XML::Atom::Person object representing the author. For example: my $author = XML::Atom::Person->new; $author->name('Foo Bar'); $author->email('foo@bar.com'); $feed->author($author); $feed->id([ $id ]) Returns an id for the feed. If $id is supplied, set the id. When generating the new feed, it is your responsibility to generate unique ID for the feed and set to XML::Atom::Feed object. You can use http permalink, tag URI scheme or urn:uuid for handy. UNICODE FLAGS
By default, XML::Atom takes off all the Unicode flag fro mthe feed content. For example, my $title = $feed->title; the variable $title contains UTF-8 bytes without Unicode flag set, even if the feed title contains some multibyte chracters. If you don't like this behaviour and wants to andle everything as Unicode characters (rather than UTF-8 bytes), set $XML::Atom::ForceUnicode flag to 1. $XML::Atom::ForceUnicode = 1; then all the data returned from XML::Atom::Feed object and XML::Atom::Entry object etc., will have Unicode flag set. The only exception will be "$entry->content->body", if content type is not text/* (e.g. image/gif). In that case, the content body is still binary data, without Unicode flag set. CREATING ATOM 1.0 FEEDS By default, XML::Atom::Feed and other classes (Entry, Link and Content) will create entities using Atom 0.3 namespaces. In order to create 1.0 feed and entry elements, you can set Version as a parameter, like: $feed = XML::Atom::Feed->new(Version => 1.0); $entry = XML::Atom::Entry->new(Version => 1.0); Setting those Version to every element would be sometimes painful. In that case, you can override the default version number by setting $XML::Atom::DefaultVersion global variable to "1.0". use XML::Atom; $XML::Atom::DefaultVersion = "1.0"; my $feed = XML::Atom::Feed->new; $feed->title("blah"); my $entry = XML::Atom::Entry->new; $feed->add_entry($entry); $feed->version; # 1.0 AUTHOR &; COPYRIGHT Please see the XML::Atom manpage for author, copyright, and license information. perl v5.12.4 2009-04-24 XML::Atom::Feed(3pm)
All times are GMT -4. The time now is 03:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy