All pastes #181320 Raw Edit

Something

public shellscript v1 · immutable
#181320 ·published 2006-09-24 20:13 UTC
rendered paste body
##Date logic *sobs*function date_logic {#a not to 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}