Sponsored Content
Homework and Emergencies Homework & Coursework Questions How to minus 2 month from current date? Post 302894802 by vbe on Thursday 27th of March 2014 10:46:11 AM
Old 03-27-2014
If this is Homework, then you are to comply with the special rules here, like filling the given template...
Thread closed!

Last edited by vbe; 03-27-2014 at 12:34 PM.. Reason: tyop
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

getting hour minus the current time

Can some one help me getting last hour of the current time with date command in a script. (7 Replies)
Discussion started by: shehzad_m
7 Replies

2. Shell Programming and Scripting

How to find the create time of a file if current date is in next month

Hi All, I want to find the time diffrence between currnt time and "abc.txt" file create time. I have solve that but if the abc.txt file created last month then is there any process to find the difftent? Exp: Create time of abc.txt is "Apr 14 06:48" and currect date is "May 17 23:47".... (1 Reply)
Discussion started by: priyankak
1 Replies

3. Shell Programming and Scripting

Script to find previous month last day minus one day timestamp

Hi All, I need to find the previous month last day minus one day, using shell script. Can you guys help me to do this. My Requirment is as below: Input for me will be 2000909(YYYYMM) I need the previous months last day minus 1 day timestamp. That is i need 2000908 months last day minus ... (3 Replies)
Discussion started by: girish.raos
3 Replies

4. UNIX for Dummies Questions & Answers

print previous month (current month minus 1) with Solaris date and ksh

Hi folks month=`date +%m`gives current month Howto print previous month (current month minus 1) with Solaris date and ksh (7 Replies)
Discussion started by: slashdotweenie
7 Replies

5. Shell Programming and Scripting

How to extract log data based on current date and month ?

Hi Gurus, I'm using HP-UX B.11.23 operating system. I've been trying to extract this log info based on the current date and month, but was having some issues as the date column which on the 4th column has a comma and the 5th column has a dot tied to it. Here is the output from my shut... (5 Replies)
Discussion started by: superHonda123
5 Replies

6. UNIX and Linux Applications

sqlite: calculating with dates - compare current date minus 6 months with stored record

Hi I have a table with name, date in format DD.MM.YYYY. I need to something like this (I try to explain in pseudo code) if SYSDATE (current date) minus 6 months > $expiry date print OK else print NOK with $name and $expiry date I know this is possible with Oracle. How to do this... (0 Replies)
Discussion started by: slashdotweenie
0 Replies

7. Shell Programming and Scripting

current date - one month in AIX

Hi, i unable to get the last month date in AIX. current date - one month Based on the forums tried but did not find the relevent information. Any help grealy appriciated. Thanks Suri. (3 Replies)
Discussion started by: onesuri
3 Replies

8. Shell Programming and Scripting

Help with getting last date of previous month and first date of previous 4th month from current date

I have requirment to get last date of previous month and the first date of previous 4th month: Example: Current date: 20130320 (yyyymmdd) Last date of previous month: 20130228 (yyyymmdd) First date of previous 4th month: 20121101 (yyyymmdd) In my shell --date, -d, -v switches are not... (3 Replies)
Discussion started by: machomaddy
3 Replies

9. AIX

AIX - Get next month from current date

As said in object, how can i obtain that? In linux i use date -d "1 month" +"%m%Y". Thanks i advance. (8 Replies)
Discussion started by: fabfisc
8 Replies

10. UNIX for Beginners Questions & Answers

How to get first & last day of a month from current date?

Hi, I need the first & last day of a month from any given date. For better understanding, if i need to back-fill data for date 07/20/2019 i.e July 20 2019, i need the first & last day has 07/01/2019 - 07/31/2019. FYI: I'm using GIT BASH terminal. sample code: export DT=$(date --date='6 days... (2 Replies)
Discussion started by: Rocky975583
2 Replies
MKDTEMP(3)                                                   Linux Programmer's Manual                                                  MKDTEMP(3)

NAME
mkdtemp - create a unique temporary directory SYNOPSIS
#include <stdlib.h> char *mkdtemp(char *template); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): mkdtemp(): /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* Glibc 2.19 and earlier: */ _BSD_SOURCE || /* Since glibc 2.10: */ _POSIX_C_SOURCE >= 200809L DESCRIPTION
The mkdtemp() function generates a uniquely named temporary directory from template. The last six characters of template must be XXXXXX and these are replaced with a string that makes the directory name unique. The directory is then created with permissions 0700. Since it will be modified, template must not be a string constant, but should be declared as a character array. RETURN VALUE
The mkdtemp() function returns a pointer to the modified template string on success, and NULL on failure, in which case errno is set appro- priately. ERRORS
EINVAL The last six characters of template were not XXXXXX. Now template is unchanged. Also see mkdir(2) for other possible values for errno. VERSIONS
Available since glibc 2.1.91. ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). +----------+---------------+---------+ |Interface | Attribute | Value | +----------+---------------+---------+ |mkdtemp() | Thread safety | MT-Safe | +----------+---------------+---------+ CONFORMING TO
POSIX.1-2008. This function is present on the BSDs. SEE ALSO
mktemp(1), mkdir(2), mkstemp(3), mktemp(3), tempnam(3), tmpfile(3), tmpnam(3) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. GNU 2016-07-17 MKDTEMP(3)
All times are GMT -4. The time now is 05:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy