12-22-2009
How to increment a user defined date value in the DATE format itself using shell script?
I need to increment a date value through shell script.
Input value consist of start date and end date in DATE format of unix.
For eg.
I need increment a date value of 1/1/09 to 31/12/09 i.e for a whole yr.
The output must look like
1/1/09
2/2/09
.
.
.
31/1/09
.
.
1/2/09
.
28/2/09
.
.
31/12/09
Please provide me a suitable solution for this in shell script.I m finding difficulty in incrementing with date function.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
:confused: Hi i am a noob and need a little help to finish my shell script. I am learning as i go but hit a problem.
I am search thorugh logs(*.rv) files to find entires between two user defined dates,
The script so far looks for the "START" and "END" of each entry at sees if it belongs To... (0 Replies)
Discussion started by: mojo24
0 Replies
2. Shell Programming and Scripting
Hi,
I want to increment date, using Shell Script, a loop to add one day after 24hrs. :confused:
Cheers
Kunal (1 Reply)
Discussion started by: niceboykunal123
1 Replies
3. Shell Programming and Scripting
Hi,
Iam new to scripting language.:o
can someone help me out solving this thread?hopingly ya....:)
I want to write a script which connects to db and searches the count in a table which has date column and id column.
If the count is not equal to 0 then it should increment the date with the one... (4 Replies)
Discussion started by: jyothi_wipro
4 Replies
4. Shell Programming and Scripting
Hi,
This may sound a Basic, but please help
I Hava a date in the Given Format
yyyy_mm_dd
Start_date=2008_07_09 (This is a Fixed Date)
I need to Increment this Date in a For loop until it equals Current Date
For(Start_date<Current_date)
xxxxxxxxxxxxxxxxxxxxxxxxxxxx... (0 Replies)
Discussion started by: dsshishya
0 Replies
5. Shell Programming and Scripting
I am trying to find out the number of days between the current date and user defined date.
I took reference from here for the date2jd() function.
Modified the function according to my requirement. But its not working properly.
Original code from here is working fine.
#!/bin/sh... (1 Reply)
Discussion started by: hiten.r.chauhan
1 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I am trying to show today's date and time in a better format than ‘date' (Using positional parameters). I found a command mktime and am wondering if this is the best command to use or will this also show me the time elapse since 1/30/70? Any help would be greatly appreciated, Thanks... (3 Replies)
Discussion started by: citizencro
3 Replies
7. Shell Programming and Scripting
hi experts,
my requirement is like this i need to develop a shell script to update date part with new incremental date time in file some 'X' which is kept at some server location incrementing every two hours.as i am new to this scripting i need support from u people,thanx in advance (1 Reply)
Discussion started by: amanmro
1 Replies
8. Shell Programming and Scripting
Plz help me
To display date in the mm/dd/yyyy. Eg. if date is 28-09-2012 the output of the shell script should be date 09/28/2012. (1 Reply)
Discussion started by: shivasaini
1 Replies
9. Shell Programming and Scripting
Need to increment the date from "currentdate + 90days" inside the for loop (i=1 to i=50) (5 Replies)
Discussion started by: aroragaurav.84
5 Replies
10. Shell Programming and Scripting
i try to set linux date & time in specific format but it keep giving me error
Example :
date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
or
date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
keep giving me this error :
date: invalid date ‘19-01-2017 00:05:01'
Please use CODE tags... (7 Replies)
Discussion started by: umen
7 Replies