All pastes #181321 Raw Edit

Someone

public shellscript v1 · immutable
#181321 ·published 2006-09-24 20:14 UTC
rendered paste body
##Date logic *sobs*function date_logic {#a not so elegant, elegant solution to the issue of month rollover.day_tmp=`date +"%d"`month_tmp=`date +"%m"`if [ $day_tmp -eq 01 ]then	if [ $month_tmp -eq 01 ] || [ $month_tmp -eq 02 ] || [ $month_tmp -eq 04 ] || [ $month_tmp -eq 06 ] || [ $month_tmp -eq 08 ] || [ $month_tmp -eq 09 ] || [ $month_tmp -eq 11 ] 	then	day=31	elif [ $month_tmp -eq 03 ]	then	day=28	elif [ $month_tmp -eq 05 ] || [ $month_tmp -eq 07 ] || [ $month_tmp -eq 10 ] || [ $month_tmp -eq 12 ]	then	day=30	fielse	day=$(( $day_tmp - 1 ))fi}