by default, the email will be sent every 2 hours starting 0628 and ending 1828 unless the start and end times are changed ... need to set 3 arguments if needing to extend the end hour and 4 arguments if needing to change the minute with Y as the first argument ... $1 should be Y to send, N to not send, G to send immediately ... if G is selected, no other arguments are required ...
this could be better but i don't have a sun box nor the time to test ... test properly before putting anything into production mode ...
Hi,
I am trying to use && set up to match two conditions within ksh:
if &&
then
'''Do something
if
somehow, I keep getting error message telling me that ] is missing.
What's wrong with my code?
Thanks a lot for your help! (1 Reply)
Actually i need to satisfy both the condition..
lik i'm lookin for two different files.. and if BOTH the files r not present then it should run the followin script.. For example
inputfile1=data/in/inputfile1.txt
inputfile2=data/in/inputfile2.txt
if
then
echo " "
echo... (6 Replies)
I'm totally new with bash programming and I don't get it how to put two conditions in one if statement. My code looks like this:
h=`date +%k`
if && ]; then$h is 10 but I don't get into my if statement. What's wrong here? (5 Replies)
I have a script that runs on multiple servers. What I want to do is have the script do the following:
if $(hostname) is equal to server or server2
then
TO_DIR=go
else
TO_DIR=stop
fi
I have tried:
if
if ]
Server is hpux.
any ideas? (1 Reply)
is it possible to use multiple conditions in a CASE statement? And if so, what is the syntax? I'm trying to use one but can't seem to get it right. I want the statement to be
CASE $vendor OR $alias
condition 1) statements;
condition 2) statements;
etc.
esac
but I keep... (25 Replies)
Hello,
I'm trying to put together a script that involves pulling data from a config file. I'm attempting to write an if statement to validate one of the pieces of data from the config file, but I think I'm fat fingering it somehow.
$config{VALUE} is being pulled from a config file but can only... (4 Replies)
I am trying to test two conditions in a single if and getting syntax error on -a and &&
if ] ; then
echo "variable a equals to variable b"
else
echo "variable a not equal to variable b"
fi
in second attempt I used -a instead of &&, referring to other website, but not sure that... (1 Reply)
Hello,
I am using shell scripting and I am recieving odd results from my if statement
if
I want it to enter the loop only if L1 is equal to zero and one of the other criteria are filled, however it is entering at other times as well. What can i do to fix this? i tried seperating it... (6 Replies)
#!/bin/bash
if &&
then
echo "True"
else
echo "False"
fi
Hi everyone, I am new to UNIX, here I have a if statement elevating two boolean conditions. I thought the output should be True because there are + in the statement. But it turns out to be False.
Can anyone... (3 Replies)
I wish to check two conditions inside the if statement
Condition 1: The two file contents should be identical // using cmp command for this.
Condition 2: The two filenames should NOT be the same.
This is what i did in vain.
if ]; then
where entry1 and entry2 are
ls *.txt | while... (7 Replies)
Discussion started by: mohtashims
7 Replies
LEARN ABOUT DEBIAN
template::timer
Timer(3pm) User Contributed Perl Documentation Timer(3pm)NAME
Template::Timer - Rudimentary profiling for Template Toolkit
VERSION
Version 1.00
SYNOPSIS
Template::Timer provides inline timings of the template processing througout your code. It's an overridden version of Template::Context
that wraps the "process()" and "include()" methods.
Using Template::Timer is simple.
use Template::Timer;
my %config = ( # Whatever your config is
INCLUDE_PATH => '/my/template/path',
COMPILE_EXT => '.ttc',
COMPILE_DIR => '/tmp/tt',
);
if ( $development_mode ) {
$config{ CONTEXT } = Template::Timer->new( %config );
}
my $template = Template->new( \%config );
Now when you process templates, HTML comments will get embedded in your output, which you can easily grep for. The nesting level is also
shown.
<!-- TIMER START: L1 process mainmenu/mainmenu.ttml -->
<!-- TIMER START: L2 include mainmenu/cssindex.tt -->
<!-- TIMER START: L3 process mainmenu/cssindex.tt -->
<!-- TIMER END: L3 process mainmenu/cssindex.tt (17.279 ms) -->
<!-- TIMER END: L2 include mainmenu/cssindex.tt (17.401 ms) -->
....
<!-- TIMER END: L3 process mainmenu/footer.tt (3.016 ms) -->
<!-- TIMER END: L2 include mainmenu/footer.tt (3.104 ms) -->
<!-- TIMER END: L1 process mainmenu/mainmenu.ttml (400.409 ms) -->
Note that since INCLUDE is a wrapper around PROCESS, calls to INCLUDEs will be doubled up, and slightly longer than the PROCESS call.
AUTHOR
Andy Lester, "<andy at petdance.com>"
BUGS
Please report any bugs or feature requests to "bug-template-timer at rt.cpan.org", or through the web interface at <http://rt.cpan.org>. I
will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
ACKNOWLEDGEMENTS
Thanks to Randal Schwartz, Bill Moseley, and to Gavin Estey for the original code.
COPYRIGHT & LICENSE
This library is free software; you can redistribute it and/or modify it under the terms of either the GNU Public License v3, or the
Artistic License 2.0.
* http://www.gnu.org/copyleft/gpl.html
* http://www.opensource.org/licenses/artistic-license-2.0.php
perl v5.12.4 2009-03-07 Timer(3pm)