by Ron | Jun 23, 2008 | Linux, Uncategorized
#!/bin/sh before=”$(date +%s)” echo $before sleep 5 Ymd=”$(date ‘+%Y%m%d’)” echo $Ymd after=”$(date +%s)” echo $after elapsed_seconds=”$(expr $after – $before)” echo Elapsed time for code block:...
by Ron | Jun 13, 2008 | Linux
Need to calculate a date in the future or past? $eight_days_ago = date(‘Ymd’, mktime(0,0,0,date(“m”),date(“d”)-8,date(“Y”)));
Recent Comments