3 More Discussions You Might Find Interesting
1. How to Post in the The UNIX and Linux Forums
Hi All,
Please help me and guide me to write a bash/shell script on Linux box to delete parent entry with all their child entries.
example:
Parent is :
----------
dn: email=yogesh.kumar@wipro.com, o=wipro, o=in
child is:
----------
dn: cn: yogesh kumar, email=yogesh.kumar@wipro.com,... (1 Reply)
Discussion started by: Chand
1 Replies
2. Shell Programming and Scripting
Hi,
I've a data file having entries like this-
$ cat BDWL.out
19571
349484
18963
349568
20180
351389
20372
350253
Now I want to add each entry and produce the final sum =1479780 as output.
How can I do that using unix shell scripting?? using loop or sed/awk ??
Thanks,
Naresh (5 Replies)
Discussion started by: NARESH1302
5 Replies
3. Shell Programming and Scripting
Hi All,
I want to detect each new file coming / getting created in unix directory.
When every new file came to directory, i have to get its details like its size , date and time stamp and store it into another file.
Could any one please tell me , how i can achieve that?
Thanks. (13 Replies)
Discussion started by: james_1984
13 Replies
LEARN ABOUT DEBIAN
www::wikipedia
WWW::Wikipedia(3pm) User Contributed Perl Documentation WWW::Wikipedia(3pm)
NAME
WWW::Wikipedia - Automated interface to the Wikipedia
SYNOPSIS
use WWW::Wikipedia;
my $wiki = WWW::Wikipedia->new();
## search for 'perl'
my $result = $wiki->search( 'perl' );
## if the entry has some text print it out
if ( $result->text() ) {
print $result->text();
}
## list any related items we can look up
print join( "
", $result->related() );
DESCRIPTION
WWW::Wikipedia provides an automated interface to the Wikipedia <http://www.wikipedia.org>, which is a free, collaborative, online
encyclopedia. This module allows you to search for a topic and return the resulting entry. It also gives you access to related topics which
are also available via the Wikipedia for that entry.
INSTALLATION
To install this module type the following:
perl Makefile.PL
make
make test
make install
METHODS
new()
The constructor. You can pass it a two letter language code, or nothing to let it default to 'en'.
## Default: English
my $wiki = WWW::Wikipedia->new();
## use the French wiki instead
my $wiki = WWW::Wikipedia->new( language => 'fr' );
WWW::Wikipedia is a subclass of LWP::UserAgent. If you would like to have more control over the user agent (control timeouts, proxies ...)
you have full access.
## set HTTP request timeout
my $wiki = WWW::Wikipedia->new();
$wiki->timeout( 2 );
You can turn off the following of wikipedia redirect directives by passing a false value to "follow_redirects".
language()
This allows you to get and set the language you want to use. Two letter language codes should be used. The default is 'en'.
my $wiki = WWW::Wikipedia->new( language => 'es' );
# Later on...
$wiki->language( 'fr' );
follow_redirects()
By default, wikipeda redirect directives are followed. Set this to false to turn that off.
search()
Which performs the search and returns a WWW::Wikipedia::Entry object which you can query further. See WWW::Wikipedia::Entry docs for more
info.
$entry = $wiki->search( 'Perl' );
print $entry->text();
If there's a problem connecting to Wikipedia, "undef" will be returned and the error message will be stored in "error()".
random()
This method fetches a random wikipedia page.
error()
This is a generic error accessor/mutator. You can retrieve any searching error messages here.
TODO
o Clean up results. Strip HTML.
o Watch the development of Special:Export XML formatting, eg: http://en.wikipedia.org/wiki/Special:Export/perl
SEE ALSO
o LWP::UserAgent
AUTHORS
Ed Summers <ehs@pobox.com>
Brian Cassidy <bricas@cpan.org>
COPYRIGHT AND LICENSE
Copyright 2003-2011 by Ed Summers
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2011-04-05 WWW::Wikipedia(3pm)