While we are on the subject of dates. Another date question


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers While we are on the subject of dates. Another date question
# 15  
Old 10-24-2003
There is a time command that will feed back elapsed and system times.
The format to use in a script would be like:
(time command ) > filename.time 2>&1

You will see output like
real 10.5
user 0.3
sys 3.6

in the filename.time file...

check the man pages for time command.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Splitting week start date and end date based on custom period start dates

Below are my custom period start and end dates based on a calender, these dates are placed in a file, for each period i need to split into three weeks for each period row, example is given below. Could you please help out to achieve solution through shell script.. File content: ... (2 Replies)
Discussion started by: nani2019
2 Replies

2. UNIX for Advanced & Expert Users

Date between 2 dates

Hi All, Can you help me in finding the business dates (Mon-Fri) between two date ranges.. (forget abt holidays in weekdays) searched and tried a lot but cant figure this. ISs there any special function availble in unix for this (5 Replies)
Discussion started by: Deena1984
5 Replies

3. Shell Programming and Scripting

ksh compare dates INSIDE a file (ie date A is > date B)

In KSH, I am pasting 2 almost identical files together and each one has a date and time on each line. I need to determine if the first instance of the date/time is greater than the 2nd instance of the date/time. If the first instance is greater, I just need to echo that line. I thought I would... (4 Replies)
Discussion started by: right_coaster
4 Replies

4. Shell Programming and Scripting

Need to capture dates between start date and end date Using perl.

Hi All, Want to get all dates and Julian week number for that date between the start date and end date. How can I achive this using perl? (To achive above functionality, I was connecting to the database from DB server. Need to execute the same script in application server, since databse... (6 Replies)
Discussion started by: Nagaraja Akkiva
6 Replies

5. Shell Programming and Scripting

Need to capture all dates between start date and End date.

Hi All, I enter Start date and end date as parameters. I need to capture dates between start date and end date. Please let me know if you have any idea the same. Thanks in advance. Nagaraja Akkivalli. (5 Replies)
Discussion started by: Nagaraja Akkiva
5 Replies

6. Shell Programming and Scripting

Using 'date' to list a range of dates

Hi guys, I have been trying to create a list of dates from a certain range, ie. range from 01011950 to 31122000 But when my below code reaches certain dates, it comes up with a; 'date: invalid date 'yyyy-mm-dd -d 1day' Sofar I have come up with the following, slow and ugly; ... (4 Replies)
Discussion started by: TAPE
4 Replies

7. Solaris

Date after 5 dates in YYYYMMDD format

Hi Experts, How to get date 5 days after current date in YYYYMMDD format? How do we compare date in YYYYMMDD format? Thanks (1 Reply)
Discussion started by: needyourhelp10
1 Replies

8. Shell Programming and Scripting

Generate quarter dates with begin date and end date

Hi All, I am trying to generate quarter dates with user giving input as begin date and end date. Example: Input by user: begin_date = "2009-01-01" end_date = 2010-04-30" required output: 2009-01-01 2009-03-31 09Q01 2009-04-01 2009-06-30 09Q02 . . till 2010-01-01 2010-03-31 10Q01 ... (9 Replies)
Discussion started by: sol_nov
9 Replies

9. Shell Programming and Scripting

Display the last five dates from the given date

Hi all, In Oracle we have got sysdate -1 to find the previous date. Is there any similar way to display date in unix shell scripting? Kindly help me to display the last five dates from the given date Thanks, Geetha (11 Replies)
Discussion started by: iamgeethuj
11 Replies

10. UNIX for Dummies Questions & Answers

using 'date' to get previous days' dates

I am familiar with using the 'date' command to get the current date but I have a situation where I need to get the previous day's date as well as the date two days prior. Theoretically I could use 'expr' to compute these values but I need it to work in instances where the previous month's dates... (2 Replies)
Discussion started by: slant-40
2 Replies
Login or Register to Ask a Question
AT(1)							      General Commands Manual							     AT(1)

NAME
at - execute commands at a later time SYNOPSIS
at [ -c ] [ -s ] [ -m ] time [ day ] [ file ] DESCRIPTION
At spools away a copy of the named file to be used as input to sh(1) or csh(1). If the -c flag (for (csh(1))) or the -s flag (for (sh(1))) is specified, then that shell will be used to execute the job; if no shell is specified, the current environment shell is used. If no file name is specified, at prompts for commands from standard input until a ^D is typed. If the -m flag is specified, mail will be sent to the user after the job has been run. If errors occur during execution of the job, then a copy of the error diagnostics will be sent to the user. If no errors occur, then a short message is sent informing the user that no errors occurred. The format of the spool file is as follows: A four line header that includes the owner of the job, the name of the job, the shell used to run the job, and whether mail will be set after the job is executed. The header is followed by a cd command to the current directory and a umask command to set the modes on any files created by the job. Then at copies all relevant environment variables to the spool file. When the script is run, it uses the user and group ID of the creator of the spool file. The time is 1 to 4 digits, with an optional following `A', `P', `N' or `M' for AM, PM, noon or midnight. One and two digit numbers are taken to be hours, three and four digits to be hours and minutes. If no letters follow the digits, a 24 hour clock time is understood. The optional day is either (1) a month name followed by a day number, or (2) a day of the week; if the word `week' follows, invocation is moved seven days further off. Names of months and days may be recognizably truncated. Examples of legitimate commands are at 8am jan 24 at -c -m 1530 fr week at -s -m 1200n week At programs are executed by periodic execution of the command /usr/libexec/atrun from cron(8). The granularity of at depends upon the how often atrun is executed. Error output is lost unless redirected or the -m flag is requested, in which case a copy of the errors is sent to the user via mail(1). FILES
/usr/spool/at spooling area /usr/spool/at/yy.ddd.hhhh.* job file /usr/spool/at/past directory where jobs are executed from /usr/spool/at/lasttimedone last time atrun was run /usr/libexec/atrun executor (run by cron(8)) SEE ALSO
atq(1), atrm(1), calendar(1), sleep(1), cron(8) DIAGNOSTICS
Complains about various syntax errors and times out of range. BUGS
Due to the granularity of the execution of /usr/libexec/atrun, there may be bugs in scheduling things almost exactly 24 hours into the future. If the system crashes, mail is not sent to the user informing them that the job was not completed. Sometimes old spool files are not removed from the directory /usr/spool/at/past. This is usually due to a system crash, and requires that they be removed by hand. 4th Berkeley Distribution October 21, 1996 AT(1)