05-11-2010
what if I wanted the date yesterday (5/10) 6:00 AM through the prev day of 5/9 6:00 AM? how would you code that?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I am in ksh88
I am trying to get the result of the calculation using 3 variables:
TOTAL
CAPACITY
and get the following error:
$DB_CAPACITY=(( $DB_SIZE * 100 / $TOTAL ))
ksh: syntax error: `((' unexpected
I cannot figure out what am I doing wrong... Thanks for any help -A (2 Replies)
Discussion started by: aoussenko
2 Replies
2. Shell Programming and Scripting
Hi
am calculating the percentage of the pass and fail.
Pass:
echo `echo 1498*100/1667| bc`%
fail:
echo `echo 169*100/1667 | bc`%
for this am getting
PASS= 89%
fail =10 %
I need to fetch the exact decimal percentage like
PASS = 89.8 %
FAIL= 10.2 %
Please advice me (3 Replies)
Discussion started by: bobprabhu
3 Replies
3. Shell Programming and Scripting
Hi all
Already posted this question,i belive i didn't exactly said my question.
I have data files it stored in the different path like
/st/vr/sum.dat
/st/vr/pass.dat
/st/vr/fail.dat
we are not suppoe to mention the hardcode value of the path.
I need to calculate the percentage of... (10 Replies)
Discussion started by: bobprabhu
10 Replies
4. Shell Programming and Scripting
Hi All
I want to make summery for
Date=245Duration=545 ... (1 Reply)
Discussion started by: nalakaatslt
1 Replies
5. Shell Programming and Scripting
Hi All
I want to make summery for
Date=245Duration=545
Date=245Duration=10
Date=245Duration=278
Date=246Duration=30
Date=246Duration=178
Date=246Duration=414
Date=247Duration=17
Date=247Duration=281
Date=247Duration=9
Date=248Duration=968
Date=248Duration=550
Date=248Duration=1011... (1 Reply)
Discussion started by: nalakaatslt
1 Replies
6. UNIX for Dummies Questions & Answers
I have a file with over 100,000 lines of data with looking to compare times of about 2000 lines to get a total time of a process. The lines of unique data are as follows.
FINER: CacSoapServer:reserveNetworkResource got the sessionID
and
INFO: Created CAC session ID
The command... (5 Replies)
Discussion started by: bpfoster76
5 Replies
7. Shell Programming and Scripting
Hi,
I want an script that calculate total memory consume by all Oracle Process
6689 oraprod 16 0 1163m 155m 150m S 0 2.0 0:01.95 oracle
7046 oraprod 16 0 1161m 18m 14m S 0 0.2 0:00.02 oracle
7392 oraprod 16 0 1165m 39m 33m S 0 0.5 0:00.07 oracle
7394 oraprod 16 0 1161m 22m 18m S... (1 Reply)
Discussion started by: telnor
1 Replies
8. Shell Programming and Scripting
for i in `lsvg`
do
echo "VG Name:" $i
echo "Total VG Size:"
lsvg $i |grep "TOTAL PPs:" |awk '{print $7}' | cut -c2-
echo "Free VG Size:"
lsvg $i |grep "FREE PPs:" | awk '{print $7}' | cut -c2-
done
The PP Sizes are in MB. I like to have the sizes in GB.
Also, I like to have the... (14 Replies)
Discussion started by: Daniel Gate
14 Replies
9. Shell Programming and Scripting
Hi, i have a large file like this:
Contig1 1 5
Contig1 2 4
Contig1 3 3
Contig1 4 5
Contig1 5 3
Contig1 6 4
Contig2 1 3
Contig2 2 7
Contig2 3 2
Contig2 4 9
Contig2 5 10
Contig2 6 3
Contig2 7 7
Contig2 8 2
Contig2 9 7
Contig2 10 5
contig1 2 4
contig1 3 3
contig1 4 5 (3 Replies)
Discussion started by: the_simpsons
3 Replies
10. Shell Programming and Scripting
Hi Gurus,
I need to get one hour before time is yyyymmddhh format.
ex. date +"%Y%m%d%H" gives 2017052814 but I need 2017052813
Thankx
Please use CODE tags as required by forum rules! (6 Replies)
Discussion started by: nalakaatslt
6 Replies
LEARN ABOUT SUSE
date::manip::migration5to6
Date::Manip::Migration5to6(3) User Contributed Perl Documentation Date::Manip::Migration5to6(3)
NAME
Date::Manip::Migration5to6 - how to upgrade from 5.xx to 6.00
SYNOPSIS
When upgrading from Date::Manip 5.xx to 6.00, a few changes may be necessary to your scripts.
The Date::Manip::Changes5to6 document lists in more detail the ways in which Date::Manip changed, but very few of these actually entail
changes to your script.
It should be noted that once the changes are made to your script, it will no longer run correctly in 5.xx.
NECESSARY AND SUGGESTED CHANGES
The following changes are necessary, or strongly suggested:
Reading config files with Date_Init
If you use Date_Init to read any config files (if you do business mode calculations, you probably do), you should remove all of the
following config variables from your call to Date_Init:
GlobalCnf=FILE
PersonalCnf=FILE
PathSep=*
IgnoreGlobalCnf=*
PersonalCnfPath=*
and replace them with:
ConfigFile=FILE
where FILE is now the full path to a config file. Also, the ConfigFile argument should be the first argument in Date_Init.
Date_ConvTZ
The Date_ConvTZ function has changed. It should now take 3 arguments:
$date = Date_ConvTZ($date,$from,$to);
If $from is not given, it defaults to the local time zone. If $to is not given, it defaults to the local time zone.
The date is converted from the $from time zone into the $to time zone. Both should be any time zone (or alias) supported by
Date::Manip.
The old $errlevel argument is no longer handled.
ConvTZ and TZ config variables
If you use either the ConvTZ or TZ config variables, you should replace them with either SetDate or ForceDate. See the
Date::Manip::Config document for information.
Other deprecated config variables
Most of the deprecated config variables continue to function (though they will be removed at a future date). These include:
GlobalCnf
IgnoreGlobalCnf
PersonalCnf
PersonalCnfPath
PathSep
TZ
Internal
The following variables have been removed. If you use any of them, you may need to modify your scripts:
ConvTZ
TodayIsMidnight
DeltaSigns
UpdateCurrTZ
today, yesterday, tomorrow
If you parse the strings "today", "yesterday", or "tomorrow" in order to get the time now, or 24 hours in the past/future, this will no
longer work. These strings now refer strictly to the date (so "today" is the current day at midnight, "yesterday" is the previous day
at midnight, etc.).
To get the time now, 24 hours ago, or 24 hours in the future, you would need to parse the strings "now", "-24:00:00", or "+24:00:00"
respectively.
Do not use Memoize
In 5.xx, it was documented that you could use the module Memoize to speed up Date::Manip, especially when sorting dates.
This information is no longer accurate. Using Memoize in conjuction with Date::Manip should have little impact on performance, and may
lead to incorrect results, especially if you change config variables.
Please see the Date::Manip::Changes5to6 (GENERAL CHANGES) document for more information.
If you find other instances where it is necessary to modify your script, please email me so that I can add that information to this
document.
BUGS AND QUESTIONS
Please refer to the Date::Manip::Problems documentation for information on submitting bug reports or questions to the author.
SEE ALSO
Date::Manip - main module documentation
LICENSE
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Sullivan Beck (sbeck@cpan.org)
perl v5.12.1 2010-01-12 Date::Manip::Migration5to6(3)