Click to See Complete Forum and Search --> : Date Artithmetic in Bash/Shell


Linux_cat
01-11-2005, 10:10 AM
Right I have posted one topic on this and have researched and found I have to do this in a Shell script for my task, anyone know of any commands I can look up???.

bradfordgd
01-11-2005, 01:40 PM
How about the date command? What is it you are trying to accomplish?

Linux_cat
01-11-2005, 04:10 PM
Thanks for replying, I've basically got a text file that I have to convert, the line goes something like this

107FRI 2002BHXCFU|ICFYXA______1__NOH_____1525|Y0106441627 41127ICFYXA______|FDF|2002-04-29-00:00|1| |10080|0

I want to take the weekday and add that to the date as the date represents the monday of the week, so I would have a key like

Mon = +1
Tue = + 2
Wed = + 3
Thu = + 4
etc,

obviously im adding to a date so need to consider values that stretch into the next month e.g 29th, you know of anyways in which i could do this?

bwkaz
01-11-2005, 09:06 PM
Please do not double post!

http://www.justlinux.com/forum/showthread.php?s=&threadid=136950

Continue the thread there.