ps -ef | perl -MDate::Calc -e 'while(<>){print "$1\t:\t$2\n" if ((/^\s+\w+\s+(\d+)\s+\d+\s+\d+\s+(\w{3}\s+\d+|20\d+|\d{2}:\d{2}:\d{2})/)&&(more_recent($2,3)))}'
writing the more_recent routine is left as a rather complex exercise The regex above will capture the following time stamp styles in $2
16:45:00
Feb 08
2011
Your more_recent routine would have to deal with that (The first is obviously today's the last obviously later so only the middle style requires the use of the Date::Calc module.
Thank you .. just starting to learn Perl so not sure what you are refering to ..
I will like to write a script that delete all files that are older than 7 days in a directory and it's subdirectories. Can any one help me out witht the magic command or script?
Thanks in advance,
Odogboly98:confused: (3 Replies)
Hi all,
I want to delete log files with extension .log which are older than 30
days. How to delete those files?
Operating system -- Sun solaris 10
Your input is highly appreciated.
Thanks in advance.
Regards,
Williams (2 Replies)
Hi, I need a .ksh script that lists all the process that are currently running and older than 3 days. once the process list is available i need to mail the list and then kill those processes.
Quick response is highly appreciated :b:
Thanks in Advance!!!
Sri (3 Replies)
Dear all,
i use incremental backup my data with .zip to my hard drive. what i need is i don't want the old .zip file older than 30 days. how to write a shell script automatically remove my external hard disc zip backup folders older than 30 days?
Regards, (2 Replies)
Hi All,
I am trying to automate some stuff to make my 'to-do-things' easier. I am in need for help regarding this.
I have an output
root 17187 3465 0 23:00:00 ? 0:01 Process1
root 4975 4974 0 May 12 ? 0:00 Process2
root 4042 16713 0 Jan 30 pts/22 0:00... (4 Replies)
Hi All,
OS :- HP-UX wm5qa B.11.23 U ia64 1119805695 unlimited-user license
I need to search files older than 50 days. I've used following command in order to search desired files, I also discoverd, it's showing today's files as well. Do you have any clue with this ?
wmqa1> find .... (4 Replies)
Hi All,
I am new to the scripting and using solaris 10 OS. Please suggest me from the below script which modifications need to be done to delete the files more that 2days older. Current script is deleting existing file.
# Remove old explorer runs if needed
DIR=`dirname ${EXP_TARGET}`
if ... (2 Replies)
Hi,
Could someone help me that what the problem is in this code?
#!/bin/sh
FOLDER=/abc/datasource/checkstatus
TIMESTAMP=$(date +%s)
for filename in $(find $FOLDER -maxdepth 1 -type f -name "CHECK_STATUS*"); do
f1=$($filename -Eo "{4}+")
f2=$(date -d "$f1" +%s)
if... (11 Replies)
Discussion started by: Home
11 Replies
LEARN ABOUT DEBIAN
color::calc::www
Color::Calc::WWW(3pm) User Contributed Perl Documentation Color::Calc::WWW(3pm)NAME
Color::Calc::WWW - Simple calculations with colors for the WWW.
SYNOPSIS
use Color::Calc::WWW;
my $background = 'green';
print 'background: ', color($background),';';
print 'border-top: solid 1px ', color_light($background),';';
print 'border-bottom: solid 1px ', color_dark($background),';';
print 'color: ', color_contrast_bw($background),';';
DESCRIPTION
The "Color::Calc::WWW" module implements simple calculations with RGB colors for the World Wide Web. This can be used to create a full
color scheme from a few colors.
This module is nearly identical to using the following:
use Color::Calc('ColorScheme' => 'WWW', 'OutputFormat' => 'html');
However, this module also makes the functions available when not imported:
use Color::Calc::WWW(); # don't import
Color::Calc::WWW::color('F00');
USAGE
By default, all functions are imported.
All functions recognize all HTML color keywords (through Graphics::ColorNames::WWW) and output the results in WWW-compatible formats, i.e.
as one of the 16 basic HTML keywords (see Graphics::ColorNames::WWW) or as #RRGGBB.
color, color_mix, ...
See L<Color::Calc> for a list of available calculation functions.
NOTE AUTHOR
Claus Faerber <CFAERBER@cpan.org>
LICENSE
Copyright 2004-2010 Claus Faerber.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-06-30 Color::Calc::WWW(3pm)