use POSIX; print strftime("%Y%m%d", localtime); [download]
In reply to Re: date +%Y%m%d by chipmunk in thread Formatting date strings (was: date +%Y%m%d) by c