7 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
How to find a file that's modified more than 2 days ago but was modified less than 5 days ago by use of any Linux utility ? (4 Replies)
Discussion started by: abdulbadii
4 Replies
2. Shell Programming and Scripting
hi,
I have a big file that contains datas since 4 years ago.
I need re-create this file but just lines that are 13 months ago from today.
see what I have: ( I have a file.ksh that calls this file.scl ok !!)
======== file.scl ================
/STATISTICS=stderr
/STABLE
/NODUPLICATES... (4 Replies)
Discussion started by: andrea_mussap
4 Replies
3. Shell Programming and Scripting
hi,
I have a big file that contains datas since 4 years ago.
I need re-create this file but just lines that are 13 months ago from today.
see what I have: ( I have a file.ksh that calls this file.scl ok !!)
======== file.scl ================
/STATISTICS=stderr
/STABLE
/NODUPLICATES... (3 Replies)
Discussion started by: andrea_mussap
3 Replies
4. Shell Programming and Scripting
Hi,
I would like to find out how can i calculate a date which is 3 months ago. I intend to run a cron job on the 1st of every month, and calculate the month 4 months earlier from the date. For example, if today's date is 1st May 2007, i would like to return 012007( January 2007).
i can get... (1 Reply)
Discussion started by: new2ss
1 Replies
5. UNIX for Dummies Questions & Answers
please help me with this????? :confused: :confused:
i need to create a program that will run in unix that will delete all files in a given directory that is at least 3 months old. first the program will need to automatically know what date it is right now to determine the files it will... (3 Replies)
Discussion started by: godalle
3 Replies
6. Shell Programming and Scripting
Hi,
how can I format date function to find n (n=1 to 11) months ego ?
For exemple now we are in july and I want to have a variable presenting april.
How should it be :
month=`date +%b`?????
Many thanks before. (8 Replies)
Discussion started by: big123456
8 Replies
7. UNIX for Advanced & Expert Users
Hi all,
Using shell script and awk statements, I manage to get the month and year of the Patch Bundle installed on the system. Now I have to compare month and year of Patch Bundle installed to the Patch Bundle which is desired on the workstation. I am able to do easily comparison of year but not... (1 Reply)
Discussion started by: pankschawla
1 Replies
LEARN ABOUT DEBIAN
algorithm::dependency::source
Algorithm::Dependency::Source(3pm) User Contributed Perl Documentation Algorithm::Dependency::Source(3pm)
NAME
Algorithm::Dependency::Source - Implements a source of heirachy items
DESCRIPTION
The Algorithm::Dependency::Source class provides an abstract parent class for implementing sources for the heirachy data the algorithm will
use. For an example of an implementation of this, see Algorithm::Dependency::Source::File, which is bundled with the main
Algorithm::Dependency package.
METHODS
new @arguments
Although you cannot directly use the "new" constructor for "Algorithm::Dependency::Source", it will work the same in all subclasses.
The constructor takes zero or more subclass specific arguments to define the location of the source of the items, and returns a new object.
Alrough it may check that the arguments you passed are valid, the source will usually NOT actually load the items from the source, instead
defering the loading until you need to use the items.
Returns a new object on success, or "undef" on error.
load
The "load" method is the public method used to actually load the items from their storage location into the the source object. The method
will automatically called, as needed, in most circumstances. You would generally only want to use "load" manually if you think there may be
some uncertainty that the source will load correctly, and want to check it will work.
Returns true if the items are loaded successfully, or "undef" on error.
item $name
The "item" method fetches and returns the item object specified by the name argument.
Returns an Algorithm::Dependency::Item object on success, or "undef" if the named item does not exist in the source.
items
The "items" method returns, as a list of objects, all of the items contained in the source. The item objects will be returned in the same
order as that in the storage location.
Returns a list of Algorithm::Dependency::Item objects on success, or "undef" on error.
missing_dependencies
By default, we are leniant with missing dependencies if the item is neved used. For systems where having a missing dependency can be very
bad, the "missing_dependencies" method checks all Items to make sure their dependencies exist.
If there are any missing dependencies, returns a reference to an array of their ids. If there are no missing dependencies, returns 0.
Returns "undef" on error.
EXTENDING
"Algorithm::Dependency::Source" itself is a fairly thin module, and it is intended that you will probably need to extend it to be able to
extract item data from whatever location you have stored them.
This is usually a fairly simple two step process.
Overload the "new" method.
Assuming your subclass takes some form or argument on creation, you will need to overload the "new" method to accept the arguments,
validate them, and store them in the source object.
Define the method "_load_item_list".
Leaving our parent's "load" method to take care of conflict, errors, and whatever, the "_load_item_list" method is used to simply
create a list of Algorithm::Dependency::Item objects from wherever you store the item, and return them as a list.
Having completed these two things, your subclass should be completed. For an example of the code, have a look at the source for the simple
subclass Algorithm::Dependency::Source::File.
SUPPORT
For general comments, contact the author.
To file a bug against this module, in a way you can keep track of, see the CPAN bug tracking system.
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Algorithm-Dependency <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Algorithm-Dependency>
AUTHOR
Adam Kennedy <adamk@cpan.org>
SEE ALSO
Algorithm::Dependency, Algorithm::Dependency::Source::File
COPYRIGHT
Copyright 2003 - 2009 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.12.4 2009-04-14 Algorithm::Dependency::Source(3pm)