I have a script which must not be run more than once at any given time. THis script will be scheduled to run every 20 mins as a cron job.
In my script can i have logic to say if this script is already running from the previous cron, then exit.
How do i go about doing that. If you describe the... (11 Replies)
I am trying to find a way to test some code, but I need to rewrite a specific URL only from a specific HTTP_HOST
The call goes out to
http://SUB.DOMAIN.COM/showAssignment/7bde10b45efdd7a97629ef2fe01f7303/jsmodule/Nevow.Athena
The ID in the middle is always random due to the cookie.
I... (5 Replies)
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)
Dear community,
what I'm try to do is deny users to run a script without parameters from command bash, but the same script should run without parameters only from crontab.
Example runs by crontab:*/5 * * * * /tmp/script.sh
Here the normal execution starts every 5 minutes
Example #1 runs by... (16 Replies)
Hello,
Am very new to perl , please help me here !!
I need help in reading a URL from command line using PERL:: Mechanize and needs all the contents from the URL to get into a file.
below is the script which i have written so far ,
#!/usr/bin/perl
use LWP::UserAgent;
use... (2 Replies)
Hi all,
I am needing some help with a script that will search for a video file by known extensions and then do a pattern search (I'm guessing via regex) and then based on a match of one type of another move the file to an assigned directory.
I would like to do this with either a shell script... (7 Replies)
Hi forum,
So I am trying to determine the OS type with the following script:
#!/usr/bin/sh
OStype1=`uname -s`
Sunos1=SunOs
if
then
echo "This system is Linux"
exit 0
elif
then
echo "This system is SunOs"
exit 0
elif (1 Reply)
Hello there,
I am not an expert in networking related stuff but I got a requirement to create UNIX script to query our Company's internal time source via NTP for time drift detect and report it when > +/- 50ms.
I have been googling a lot but thought to post it in this forum to get a... (17 Replies)
Discussion started by: Green_Star
17 Replies
LEARN ABOUT DEBIAN
html::tagcloud
HTML::TagCloud(3pm) User Contributed Perl Documentation HTML::TagCloud(3pm)NAME
HTML::TagCloud - Generate An HTML Tag Cloud
SYNOPSIS
# A cloud with tags that link to other web pages.
my $cloud = HTML::TagCloud->new;
$cloud->add($tag1, $url1, $count1);
$cloud->add($tag2, $url2, $count2);
$cloud->add($tag3, $url3, $count3);
my $html = $cloud->html_and_css(50);
# A cloud with tags that do not link to other web pages.
my $cloud = HTML::TagCloud->new;
$cloud->add_static($tag1, $count1);
$cloud->add_static($tag2, $count2);
$cloud->add_static($tag3, $count3);
my $html = $cloud->html_and_css(50);
# A cloud that is comprised of tags in multiple categories.
my $cloud = HTML::TagCloud->new;
$cloud->add($tag1, $url1, $count1, $category1);
$cloud->add($tag2, $url2, $count2, $category2);
$cloud->add($tag3, $url3, $count3, $category3);
my $html = $cloud->html_and_css(50);
# The same cloud without tags that link to other web pages.
my $cloud = HTML::TagCloud->new;
$cloud->add_static($tag1, $count1, $category1);
$cloud->add_static($tag2, $count2, $category2);
$cloud->add_static($tag3, $count3, $category3);
my $html = $cloud->html_and_css(50);
# Obtaining uncategorized HTML for a categorized tag cloud.
my $html = $cloud->html_without_categories();
# Explicitly requesting categorized HTML.
my $html = $cloud->html_with_categories();
DESCRIPTION
The HTML::TagCloud module enables you to generate "tag clouds" in HTML. Tag clouds serve as a textual way to visualize terms and topics
that are used most frequently. The tags are sorted alphabetically and a larger font is used to indicate more frequent term usage.
Example sites with tag clouds: <http://www.43things.com/>, <http://www.astray.com/recipes/> and <http://www.flickr.com/photos/tags/>.
This module provides a simple interface to generating a CSS-based HTML tag cloud. You simply pass in a set of tags, their URL and their
count. This module outputs stylesheet-based HTML. You may use the included CSS or use your own.
CONSTRUCTOR
new
The constructor takes a few optional arguments:
my $cloud = HTML::TagCloud->new(levels=>10);
if not provided, levels defaults to 24
my $cloud = HTML::TagCloud->new(distinguish_adjacent_tags=>1);
If distinguish_adjacent_tags is true HTML::TagCloud will use different CSS classes for adjacent tags in order to be able to make it easier
to distinguish adjacent multi-word tags. If not specified, this parameter defaults to a false value.
my $cloud = HTML::TagCloud->new(categories=>@categories);
If categories are provided then tags are grouped in separate divisions by category when the HTML fragment is generated.
METHODS
add
This module adds a tag into the cloud. You pass in the tag name, its URL and its count:
$cloud->add($tag1, $url1, $count1);
$cloud->add($tag2, $url2, $count2);
$cloud->add($tag3, $url3, $count3);
add_static
This module adds a tag that does not link to another web page into the cloud. You pass in the tag name and its count:
$cloud->add_static($tag1, $count1);
$cloud->add_static($tag2, $count2);
tags($limit)
Returns a list of hashrefs representing each tag in the cloud, sorted by alphabet. Each tag has the following keys: name, count, url and
level.
css
This returns the CSS that will format the HTML returned by the html() method with tags which have a high count as larger:
my $css = $cloud->css;
html($limit)
This returns the tag cloud as HTML without the embedded CSS (you should use both css() and html() or simply the html_and_css() method). If
any categories were specified when items were being placed in the cloud then the tags will be organized into divisions by category name.
If a limit is provided, only the top $limit tags are in the cloud, otherwise all the tags are in the cloud:
my $html = $cloud->html(200);
html_with_categories($limit)
This returns the tag cloud as HTML without the embedded CSS. The tags will be arranged into divisions by category. If a limit is
provided, only the top $limit tags are in the cloud. Otherwise, all tags are in the cloud.
html_without_categories($limit)
This returns the tag cloud as HTML without the embedded CSS. The tags will not be grouped by category if this method is used to generate
the HTML.
html_and_css($limit)
This returns the tag cloud as HTML with embedded CSS. If a limit is provided, only the top $limit tags are in the cloud, otherwise all the
tags are in the cloud:
my $html_and_css = $cloud->html_and_css(50);
AUTHOR
Leon Brocard, "<acme@astray.com>".
COPYRIGHT
Copyright (C) 2005-6, Leon Brocard
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
perl v5.12.3 2011-06-18 HTML::TagCloud(3pm)