#date '+%Y%m%d' | awk '{ print $1 }'
20061019
#date '+%Y%m%d' | awk '{ print $1-1 }'
20061018
...........................................
bash-2.03# more main.sh
#!/bin/sh
dt=`date '+%Y%m%d' | awk '{ print $1-1 }'`
mv billing_detail.xls billing_detail_${dt}.xls
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/43132/viewspace-872638/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/43132/viewspace-872638/