01-31-2013
What is it exactly that you want?
# of weeks in Jan 2012 or 2012?
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I search how i could do to find if a year (for example 2004, 1989, 2058) has 52 or 53 weeks...
Have you a idea for me please??? (1 Reply)
Discussion started by: Castelior
1 Replies
2. UNIX for Dummies Questions & Answers
I need to calcualte the size of a directory by the year the files in that directory were created .
For example the script will sum up, by year, the number of blocks for that directory and its' subdirectories for files created / accessed in that year.
I need a report that would look like... (11 Replies)
Discussion started by: igidttam
11 Replies
3. Shell Programming and Scripting
Good afternoon! Im new at scripting and Im trying to write a script to
calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies
4. Shell Programming and Scripting
Input file
SFSQW 5192.56
HNRNPK 611.486
QEQW 1202.15
ASDR 568.627
QWET 6382.11
SFSQW 4386.3
HNRNPK 100
SFSQW 500
Desired output file
SFSQW 10078.86 3
QWET 6382.11 1
QEQW 1202.15 1
HNRNPK 711.49 2
ASDR 568.63 1
The way I tried: (2 Replies)
Discussion started by: patrick87
2 Replies
5. Shell Programming and Scripting
#!/bin/bash
for digit in $(seq 1 10)
do
if ping -c1 -w2 192.168.1.$digit &> /dev/null
then
echo "192.168.1.$digit is UP"
else
echo "192.168.1.$digit is DOWN"
fi
done (3 Replies)
Discussion started by: fusetrips
3 Replies
6. AIX
Hi anyone can help?
How to calculate total number of weeks from a specify date, for example, 01 Jan 2012.
Thx!
https://www.unix.com/images/misc/progress.gif (1 Reply)
Discussion started by: rayray2013
1 Replies
7. Shell Programming and Scripting
Hi All ,
I have the following script as below , I tried to modify to meet the requirement , could someone help ? very thanks
================================================================================================
while read STR NAME; do
Total=0
MyString="$STR"
GetData () {... (18 Replies)
Discussion started by: ust3
18 Replies
8. UNIX for Beginners Questions & Answers
Hi Folks -
I'm looking for the best way to to increment fiscal weeks - allow me to explain.
At my one client, 10/01/17 was the beginning if year fiscal year 2018.
Each week, I need to manage a unique set of variable that are updated in my application - they are called substitution variables.... (31 Replies)
Discussion started by: SIMMS7400
31 Replies
9. Solaris
Hi,
I want to get total number of cores on my all non-global zones on Solaris 10. I got two methods and both are giving different results. Below link is a script, which tells me that total cores are 8
Mandalika's scratchpad: Oracle Solaris: Show Me the CPU, vCPU, Core Counts and the... (4 Replies)
Discussion started by: ron323232
4 Replies
LEARN ABOUT DEBIAN
timetrans
TIMETRANS(1p) User Contributed Perl Documentation TIMETRANS(1p)
NAME
timetrans - Converts time into time
SYNOPSIS
timetrans [units-options] [-count]
DESCRIPTION
timetrans converts time from one type of unit to another. If any of the units options are specified, then timetrans will convert those
time units into the number of seconds to which they add up. If given the count option, timetrans will convert that number of seconds into
the appropriate number of weeks, days, hours, minutes, and seconds. The converted result is printed out. Units options cannot be
specified in the same execution as the count option, and vice versa.
timetrans is intended for use with DNSSEC-Tools, for calculating a zone's expiration time.
OPTIONS
Units Options
The converted value of each unit is totaled and a single result printed.
-seconds seconds
Count of seconds to convert to seconds.
-minutes minutes
Count of minutes to convert to seconds.
-hours hours
Count of hours to convert to seconds.
-days days
Count of days to convert to seconds.
-weeks weeks
Count of weeks to convert to seconds.
Count Option
The specified seconds count is converted to the appropriate number of weeks, days, hours, minutes, and seconds.
-count seconds
Count of seconds to convert to the appropriate set of units.
Other Options
timetrans has the following miscellaneous options.
-Version
Displays the version information for timetrans and the DNSSEC-Tools package.
EXAMPLES
Example 1: Converting 5 days into seconds
$(42)> timetrans -days 5
432000
Example 2: Converting 2 weeks into seconds
$(43)> timetrans -w 2
1209600
Example 3: Converting 8 days and 8 hours into seconds
$(44)> timetrans -d 8 -hours 8
720000
Example 4: Converting 1 week, 1 day, and 8 hours into seconds
$(46)> timetrans -w 1 -days 1 -h 8
720000
Example 5: Converting 14 weeks, 4 days, 21 hours, 8 minutes, and 8 seconds into seconds
$(47)> timetrans -w 14 -d 4 -h 21 -m 8 -s 8
8888888
Example 6: Converting 720000 seconds into time units
$(48)> timetrans -c 720000
1 week, 1 day, 8 hours
Example 7: Converting 1814421 seconds into time units
$(49)> timetrans -c 1814421
3 weeks, 21 seconds
Example 8: Converting 8888888 seconds into time units
$(50)> timetrans -c 8888888
14 weeks, 4 days, 21 hours, 8 minutes, 8 seconds
COPYRIGHT
Copyright 2004-2012 SPARTA, Inc. All rights reserved. See the COPYING file included with the DNSSEC-Tools package for details.
AUTHOR
Wayne Morrison, tewok@tislabs.com
SEE ALSO
zonesigner(8)
Net::DNS::SEC::Tools::timetrans.pm(3)
perl v5.14.2 2012-06-21 TIMETRANS(1p)