All pastes #262307 Raw Edit

Anonymous

public shellscript v1 · immutable
#262307 ·published 2006-11-30 11:47 UTC
rendered paste body
#!/bin/bashnow=`/bin/date +%s`onemonth="2592000"validperiods="1 3 6 12"for period in $validperiodsdo  epochs[$period]=`expr $now - \( $period \* $onemonth \)`donefor i in "${epochs[@]}"do  echo "i: ${i}"  echo "key: " # i need to know if it's 1, 3, 6 or 12  echo "value: ${epochs[$i]}" # this does not seem to work  echo "--"done