10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I am trying to add few (say 3 days) to sysdate using -
date -d '+ 3 days' +%y%m%d
and it works as expected.
But how to add few (say 3 days) to a literal date value and how bash treats a literal value as a date. Can we say just like in ORACLE TO_DATE that my given literal date value... (2 Replies)
Discussion started by: pointers1234
2 Replies
2. Shell Programming and Scripting
I am not able to fetch first date and last date previous month
date -d -1month +%Y-%m-%d
date -d -1month +%Y-%m-%d
I need two format dd-mm-yyy
previous month 01-03-2016
previous month 31-03-2016
and also only date 1 to 31
Aprriciate your replay (4 Replies)
Discussion started by: jagu
4 Replies
3. Shell Programming and Scripting
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
4. Shell Programming and Scripting
Hello,
I'm on FreeBSD 8.2-STABLE shell and I was trying the following cron entry for end of month:
59 23 * * * && /home/user/eomt.sh >/dev/null 2>&1
I get the following error
Subject: Cron <user@shell>
eomt.sh contains the following codes
#!/bin/sh
rm /home/user/tst/logs/* &&... (9 Replies)
Discussion started by: user`
9 Replies
5. UNIX for Dummies Questions & Answers
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
6. Shell Programming and Scripting
Hi All,
I need to run a job every month at the beginning of the month which is scheduled through autosys, lets say on 03/01/2010. I need to pass the last month's i.e February's first_date = 02/01/2010 and last_date = 02/28/2010 as variables to a stored procedure. Can somebody please pass... (2 Replies)
Discussion started by: vigdmab
2 Replies
7. Shell Programming and Scripting
Hi ,
Can someone please assist to get monthend using cal utility and monthend shouldn't be saturday or sunday.
Cheers,
gehlnar (2 Replies)
Discussion started by: gehlnar
2 Replies
8. Shell Programming and Scripting
I am running AIX 5.3 with the default shell as ksh.
I would like to know how to run a cron job on this system the last calendar day of the month. I found an example, but, I'm not sure if it will work with AIX and ksh...
02 16 * * * && /home/user/job-eom.kshI also need to be able to run a... (2 Replies)
Discussion started by: jthompson333
2 Replies
9. UNIX for Advanced & Expert Users
Hi,
How to get the lastmonth's end date? (have current date) through s shell script. I need to get it and pass it to a procedure.
Please advice.
Thanks in advance. (7 Replies)
Discussion started by: vanathi
7 Replies
10. UNIX for Advanced & Expert Users
Is it possible to use cron to schedule a job that will run the first 3 Sunday's during a month in addition to the last day of the month? (3 Replies)
Discussion started by: cpete
3 Replies