10 More Discussions You Might Find Interesting
1. 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
2. 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
3. Shell Programming and Scripting
Hi Am using unix Ksh
Datecalc and --date functions are not working
have two input variables as
DATE=01/12/2012
DATE1=23/12/2012
Need output as
no of sundays = 4
Can anyone help me pls :( (2 Replies)
Discussion started by: Venkatesh1
2 Replies
4. Shell Programming and Scripting
Dear experts,
I'm using solaris 5.10 and bash. I want to zip file "Amount.txt" to "Amount.zip" and rename it to "Amount_<prev_month>_<this year>.zip". For example, file for this month should be renamed to "Amount_06_2012.zip", for next month it should be "Amount_07_2012.zip". I have no problem... (8 Replies)
Discussion started by: kris.adrianto
8 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have a script that is looking for Files with a previous Year-month format. example if the script runs anyday in Oct2011 it has to look for Sept2011 files.
it looks for FILENMAE_201109.TXT.
I had used the code below and it works fine for many months but fails for Oct2011..
date... (2 Replies)
Discussion started by: rock1
2 Replies
6. Shell Programming and Scripting
Hi guys,
I had a scenario...
1. I had to get the previous days date in yyyymmdd format
2. i had to create a file with Date inthe format yyyymmdd.txt format
both are different
thanks guys in advance.. (4 Replies)
Discussion started by: apple2685
4 Replies
7. UNIX for Dummies Questions & Answers
I need to append previous days date to my file which is generated using a script. I am working on Solaris 10. Thanks! (2 Replies)
Discussion started by: Twisha
2 Replies
8. Shell Programming and Scripting
hello experts,
H r u . i just need to get the previous file from the latest file let say.
fileA
fileB
fileC
fileD
fileE
in this case fileE is the latest file but i need a script which will always get the name of the previouse file like fileD.
currently i am using this command to get the... (3 Replies)
Discussion started by: shary
3 Replies
9. Shell Programming and Scripting
Hi,
I am trying to modify a script which accepts date in format dd/mm/yy. I am trying to modify the script so that it retrieves the date that was 15 days earlier from today as start date. Eg.if today is 05/09/2006, the script should retrieve 21/08/2006 as start date. Is there any script/code to... (2 Replies)
Discussion started by: ritzwan0
2 Replies
10. UNIX for Dummies Questions & Answers
Hi
I want to add the date to a filename in a script I have.
So I want
exp myfile01-FEB-2005.dmp
How do I get the 01-FEB-2005 in there?
Cheers
Rich (3 Replies)
Discussion started by: richard1975
3 Replies