Write a script using a Linux shell programming language to perform clock management for a small daycare.
The program should manage all time in and out routines. At the end of the each day should give the Total hours worked that day.
Example:
I have no clue where to start. I tried take in the user's input for IN/OUT Time, but then I'm not sure how to parse it to calculate the total hours. Not sure if there is another approach for this.
Moderator's Comments:
Please use code tags for samples, as per forum rules.
This appears to be homework.
Quote:
Write a script using a Linux shell programming language to perform clock management for a small daycare.
That sounds like an assignment given to a student.
Ok, another fun hiccup in my UNIX learning curve. I am trying to count the number of occurrences of an IP address across multiple files named example.hits. I can extract the number of occurrences from the files individually but when you use grep -c with multiple files you get the output similar to... (5 Replies)
Hi Frens,
I want to list some files from a directory, which contains "DONE" in their name, i am receiving files every minute. In this i want to list all the files which are newer than 6 hours but older than 3 hours, of current time
i dont want my list to contain the latest files which are ... (4 Replies)
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)
Dear Folks,
I want to calculate the elapsed hours between two time columns. I am using timestampdiff method for the same. I am able to get the value. But facing an issue of decimal values. For example the elapsed hours between 09:00:00 and 20:30:00 is coming as 11 instead of 11.5. I am using below... (1 Reply)
Hi Experts,
In a particular dir, I have many files *AJAY*.
How can I get total size of all such files.
I tried du -hs *AJAY* but it gave me individual size of all files.
All I require is summation of all.
Thanks,
Ajay (4 Replies)
Hi All,
I have the following time stamp data in 2 columns
Date TimeStamp(also with milliseconds)
05/23/2012 08:30:11.250
05/23/2012 08:30:15.500
05/23/2012 08:31.15.500
.
.
etc
From this data I need the following output.
0.00( row1-row1 in seconds)
04.25( row2-row1 in... (5 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write an awk script(company.awk) for the workers file to find the number of workers of each departman, total... (8 Replies)
Hello Friends,
I've been trying to calculate total number of a certain match in multiple data records files (DRs).
Let say I have a daily created folders for each day since the beginning of july like the following
drwxrwxrwx 2 mmsuper med 65536 Jul 1 23:59 20150701
drwxrwxrwx 2 mmsuper... (1 Reply)
Discussion started by: EAGL€
1 Replies
LEARN ABOUT DEBIAN
time::ctime
Time::CTime(3pm) User Contributed Perl Documentation Time::CTime(3pm)NAME
Time::CTime -- format times ala POSIX asctime
SYNOPSIS
use Time::CTime
print ctime(time);
print asctime(localtime(time));
print strftime(template, localtime(time));
strftime conversions
%% PERCENT
%a day of the week abbr
%A day of the week
%b month abbr
%B month
%c ctime format: Sat Nov 19 21:05:57 1994
%d DD
%D MM/DD/YY
%e numeric day of the month
%f floating point seconds (milliseconds): .314
%F floating point seconds (microseconds): .314159
%h month abbr
%H hour, 24 hour clock, leading 0's)
%I hour, 12 hour clock, leading 0's)
%j day of the year
%k hour
%l hour, 12 hour clock
%m month number, starting with 1, leading 0's
%M minute, leading 0's
%n NEWLINE
%o ornate day of month -- "1st", "2nd", "25th", etc.
%p AM or PM
%r time format: 09:05:57 PM
%R time format: 21:05
%S seconds, leading 0's
%t TAB
%T time format: 21:05:57
%U week number, Sunday as first day of week
%v DD-Mon-Year
%w day of the week, numerically, Sunday == 0
%W week number, Monday as first day of week
%x date format: 11/19/94
%X time format: 21:05:57
%y year (2 digits)
%Y year (4 digits)
%Z timezone in ascii. eg: PST
DESCRIPTION
This module provides routines to format dates. They correspond to the libc routines. &strftime() supports a pretty good set of coversions
-- more than most C libraries.
strftime supports a pretty good set of conversions.
The POSIX module has very similar functionality. You should consider using it instead if you do not have allergic reactions to system
libraries.
GENESIS
Written by David Muir Sharnoff <muir@idiom.org>.
The starting point for this package was a posting by Paul Foley <paul@ascent.com>
LICENSE
Copyright (C) 1996-2010 David Muir Sharnoff. Copyright (C) 2011 Google, Inc. License hereby granted for anyone to use, modify or
redistribute this module at their own risk. Please feed useful changes back to cpan@dave.sharnoff.org.
perl v5.12.3 2011-05-12 Time::CTime(3pm)