Sponsored Content
Top Forums Shell Programming and Scripting Yesterday in i.e. May 09 and 05/09 format Post 302197284 by joeyg on Tuesday 20th of May 2008 04:46:49 PM
Old 05-20-2008
Question What is meant by 09

You refer to May 09 becoming 05/09. What is the significance of the "09"?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

get yesterday date in yyyymmdd format

I would like to know how I could get a yesterday date in yyyymmdd e.g. today is 20011109, and I would like to get 20011108. Thank you!:confused: (2 Replies)
Discussion started by: hk_newbie
2 Replies

2. UNIX for Dummies Questions & Answers

Yesterday's date

Does anyone know of an easy way to use the date function to get yesterday's date in this format: Nov 21 ? (2 Replies)
Discussion started by: ssmiths001
2 Replies

3. HP-UX

How can i get the yesterday's date in YYYYMMDD format

How can i get the yesterday's date in YYYYMMDD format??? (4 Replies)
Discussion started by: prasadsr
4 Replies

4. Shell Programming and Scripting

yesterday

How to get the date before the current date on unix tru64? Today is 2008-02-27. I'll need 2008-02-26. Thx (0 Replies)
Discussion started by: Tlg13team
0 Replies

5. Shell Programming and Scripting

get yesterday in yyyymmdd format

how can i get yesterday in yyyymmdd format? :confused: (13 Replies)
Discussion started by: aaron_fong
13 Replies

6. UNIX for Dummies Questions & Answers

Hello and I need help like in yesterday

I haven't been using linux very long( and when I say that its only been about 1 week for me) I was told to do the following: Create a Bash script that will copy all the files and subdirectories in one directory to a newly created directory. You may name the receiving directory anything you like.... (4 Replies)
Discussion started by: reecygee
4 Replies

7. Shell Programming and Scripting

Get yesterday's date in year-month-day format?

Dear All, Actually, i'm doing some reporting job and i need to pass yesterday's date in Year-Month-Day format(e.g. 2009-06-10) to another program for generating 2009-06-10 report. to get today's date, it's easy to just date '+%Y%m%d' , but no idea how can i get this kind of format for... (2 Replies)
Discussion started by: tiger2000
2 Replies

8. UNIX for Dummies Questions & Answers

perl yesterday's date in mmddyyyy format

Hi, Below command is producing yesaterday's date in mmddyy format - perl -e '@T=localtime(time-86400);printf("%02d%02d%02d",$T+1,$T,($T+1900)%100)' But i want the date in mmddyyyy format; plz help. Thankx, Rahul Bahulekar. ---------- Post updated at 05:13 AM ---------- Previous... (1 Reply)
Discussion started by: rahulbahulekar
1 Replies

9. Shell Programming and Scripting

perl one-liner to get yesterday's date in format dd-MMM-yy (i.e. 01-JAN-12)

I have the following perl one-liner to get yesterday's date, but I would like it in the form of dd-MMM-yy (for example: 01-JAN-12). Can someone alter the below code so I get the format I want? Also, could someone also give me a line for dd-Mmm-yy (for example 01-Jan-12)? Code: YEST=`perl -w... (3 Replies)
Discussion started by: thibodc
3 Replies

10. UNIX for Beginners Questions & Answers

Yesterday

hi guys i want to know how can i insert in a variable yesterday for example : today=`date +%Y%m%d` yesterday =??? thanks a lot Please use CODE tags as required by forum rules! (4 Replies)
Discussion started by: Francesco_IT
4 Replies
matherr(3m)															       matherr(3m)

Name
       matherr - error-handling function for System V math library

Syntax
       #include <math.h>

       int matherr (x)
       struct exception *x;

Description
       The  subroutine	is  invoked by functions in the System V Math Library when errors are detected.  Users may define their own procedures for
       handling errors by including a function named in their programs.  The subroutine must be of the form described above.   A  pointer  to  the
       exception  structure x will be passed to the user-supplied function when an error occurs.  This structure, which is defined in the <math.h>
       header file, is as follows:
       struct exception {
	    int type;
	    char *name;
	    double arg1, arg2, retval;
       };

       The element type is an integer describing the type of error that has occurred, from the following list of constants (defined in the  header
       file):
       DOMAIN	  domain error
       SING	  singularity
       OVERFLOW   overflow
       UNDERFLOW  underflow
       TLOSS	  total loss of significance
       PLOSS	  partial loss of significance

       The  element name points to a string containing the name of the function that had the error.  The variables arg1 and arg2 are the arguments
       to the function that had the error.  The retval is a double that is returned by the function having the error.  If  it  supplies  a  return
       value, the user's must return nonzero.  If the default error value is to be returned, the user's must return 0.

       If  is  not  supplied  by the user, the default error-handling procedures, described with the math functions involved, will be invoked upon
       error.  These procedures are also summarized in the table below.  In every case, errno is set to nonzero and the program continues.

Examples
       matherr(x)
       register struct exception *x;
       {
	    switch (x->type) {
	    case DOMAIN:
	    case SING: /* print message and abort */
		 fprintf(stderr, "domain error in %s
", x->name);
		 abort( );
	    case OVERFLOW:
		 if (!strcmp("exp", x->name)) {
		      /* if exp, print message, return the argument */
		      fprintf(stderr, "exp of %f
", x->arg1);
		      x->retval = x->arg1;
		 } else if (!strcmp("sinh", x->name)) {
		      /* if sinh, set errno, return 0 */
		      errno = ERANGE;
		      x->retval = 0;
		 } else
		      /* otherwise, return HUGE */
		      x->retval = HUGE;
		 break;
	    case UNDERFLOW:
		 return(0); /* execute default procedure */
	    case TLOSS:
	    case PLOSS:
		 /* print message and return 0 */
		 fprintf(stderr, "loss of significance in %s
", x->name);
		 x->retval = 0;
		 break;
	    }
	    return(1);
       }

+-------------------------------------------------------------------------------------------------------------------------------------------------+
|		       |				DEFAULT ERROR HANDLING PROCEDURES							  |
|		       |															  |
+----------------------+--------------------------+-----------------+--------------------+----------------------+-----------------+---------------+
|		       |     Types of Errors	  |		    |			 |			|		  |		  |
+----------------------+--------------------------+-----------------+--------------------+----------------------+-----------------+---------------+
|		       |	 DOMAIN 	  |	 SING	    |	  OVERFLOW	 |	UNDERFLOW	|     TLOSS	  |	PLOSS	  |
+----------------------+--------------------------+-----------------+--------------------+----------------------+-----------------+---------------+
|   BESSEL:	       |	    -		  |	  -	    |	      H 	 |	    0		|      M, 0	  |	  *	  |
|   y0, y1, yn	       |	 M, -H		  |	  -	    |	      - 	 |	    -		|	-	  |	  -	  |
|    (neg. no.)        |			  |		    |			 |			|		  |		  |
+----------------------+--------------------------+-----------------+--------------------+----------------------+-----------------+---------------+
|   EXP:	       |	    -		  |	  -	    |	      H 	 |	    0		|	-	  |		  |
+----------------------+--------------------------+-----------------+--------------------+----------------------+-----------------+---------------+
|   POW:	       |	    -		  |	  -	    |	      H 	 |	    0		|	-	  |	  -	  |
|   (neg.)**(non-      |	  M, 0		  |	  -	    |	      - 	 |	    -		|	-	  |	  -	  |
|    int.), 0**0       |			  |		    |			 |			|		  |		  |
+----------------------+--------------------------+-----------------+--------------------+----------------------+-----------------+---------------+
|   LOG:	       |			  |		    |			 |			|		  |		  |
|   log(0):	       |	    -		  |	M, -H	    |	      - 	 |	    -		|	-	  |	  -	  |
|   log(neg.):	       |	  M, -H 	  |	  -	    |	      - 	 |	    -		|	-	  |	  -	  |
+----------------------+--------------------------+-----------------+--------------------+----------------------+-----------------+---------------+
|   SQRT:	       |	  M, 0		  |	  -	    |	      - 	 |	    -		|	-	  |	  -	  |
+----------------------+--------------------------+-----------------+--------------------+----------------------+-----------------+---------------+
|   GAMMA:	       |	    -		  |	 M, H	    |	      - 	 |	    -		|	-	  |	  -	  |
+----------------------+--------------------------+-----------------+--------------------+----------------------+-----------------+---------------+
|   HYPOT:	       |	    -		  |	  -	    |	      H 	 |	    -		|	-	  |	  -	  |
+----------------------+--------------------------+-----------------+--------------------+----------------------+-----------------+---------------+
|   SINH, COSH:        |	    -		  |	  -	    |	      H 	 |	    -		|	-	  |	  -	  |
+----------------------+--------------------------+-----------------+--------------------+----------------------+-----------------+---------------+
|   SIN, COS:	       |	    -		  |	  -	    |	      - 	 |	    -		|      M, 0	  |	  *	  |
+----------------------+--------------------------+-----------------+--------------------+----------------------+-----------------+---------------+
|   TAN:	       |	    -		  |	  -	    |	      H 	 |	    -		|      M, 0	  |	  *	  |
+----------------------+--------------------------+-----------------+--------------------+----------------------+-----------------+---------------+
|   ACOS, ASIN:        |	  M, 0		  |	  -	    |	      - 	 |	    -		|	-	  |	  -	  |
+----------------------+--------------------------+-----------------+--------------------+----------------------+-----------------+---------------+
       +----------------------------------------------------+
       |		   ABBREVIATIONS		    |
       | *    As much as possible of the value is returned. |
       | M    Message is printed.			    |
       | H    HUGE is returned. 			    |
       | -H   -HUGE is returned.			    |
       | 0    0 is returned.				    |
       +----------------------------------------------------+

									VAX							       matherr(3m)
All times are GMT -4. The time now is 03:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy