Script to find a date variable and increment it

Hi,

I have parameter file wo_location.prm which has a date variable $last_upd_date= 02032016.

I need to write a unix shell script to find that variable and increment it by 1 day.

The path to the file is root/dir_lc/shared/param/wo_location.prm and the variable is $last_upd_date.

Any assistance would be highly appreciated.

Welcome to the forum.

If you step back a little and look at your first post from a slightly different angle, you will agree that you have not given us TOO much to work with. On top of the usual ones like "What's your OS? shell?" , quite some questions are left open, as

  • is THAT the parameter file structure: $variable= value? Sure about the $ sign?
  • WHAT is the date format - ddmmyyyy or mmddyyyy? (i.e. WHAT should we increment?)
  • is that a task for a script or better done manually?
  • how often should it run? year in and year out?
  • would it need month and year increment as well, then, and leap years considered?

Sorry about that. Here are some more details:

I came across this question in an interview. Needless to say I did not clear it.:o

Anyway the parameter file wo_location.prm looks like the following:

------------------------------------------------

[Global]
$$start_date = 02/02/2016 10:21:25.000000
$$last_upd_date= 02/03/2016 16:25:56.000000

----------------------------------------------------
The date format is ddmmyyyy
The script would run when ever we needed to increment the date by one day.
The OS is SUN solaris.

Thanks