plus3days=$( date '+%Y-%m-%d %H:%M:%S' 
                    -D '%s' 
                    -d $((`date '+%s'` +  3*24*60*60)) 
            )
            
Aha  - I didn't know you could get date to just chuck out "seconds since
epoch"

so
 1. get seconds since epoch, add seconds as desired
 2. tell dat you will be giving it a time in "seconds since epoch" format
 3. ask for a date string in a format suitable for touch
           
lovely - thank you!

I wish I was clever...

> touch -d "$plus3days" FILE
 
> Note that date -D is a busybox extension.

David
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to