yitz_ 1250480407 learn # h=$(date +%H) ; echo Good $( (( h >= 4 && h < 12 )) && echo morning ; (( h >= 12 && h < 17 )) && echo afternoon ; (( h >= 17 && h < 22 )) && echo evening ; (( h >= 22 || h < 4 )) && echo night ; ) lhunath 1378490212 forget lhunath 1378490226 learn # h=$(date +%H) tod=morning; (( h >= 12 )) && tod=afternoon; (( h >= 17 )) && tod=evening; (( h >= 22 || h < 4 )) && tod=night; echo "Good $tod." lhunath 1378490392 forget lhunath 1378490417 learn # h=$(date +%H) h=${h#0} tod=morning; (( h >= 12 )) && tod=afternoon; (( h >= 17 )) && tod=evening; (( h >= 22 || h < 4 )) && tod=night; echo "Good $tod." lhunath 1378490517 forget lhunath 1378490581 learn # h=$((10#$(date +%H))) h=${h#0} tod=morning; (( h >= 12 )) && tod=afternoon; (( h >= 17 )) && tod=evening; (( h >= 22 || h < 4 )) && tod=night; echo "Good $tod." greycat 1378492620 forget greycat 1378492623 learn h=$(date +%H) h=${h#0}; if ((h<=4 || h>=22)); then tod=night; elif ((h>=17)); then tod=evening; elif ((h>=12)); then tod=afternoon; else tod=morning; fi; echo "Good $tod, #bash!" greycat 1378492644 forget greycat 1378492651 learn # h=$(date +%H) h=${h#0}; if ((h<=4 || h>=22)); then tod=night; elif ((h>=17)); then tod=evening; elif ((h>=12)); then tod=afternoon; else tod=morning; fi; echo "Good $tod, #bash!"