On Tue, Feb 10, 2009 at 02:36:07PM -0600, Scott Granneman wrote: > is there a shorter way to do this: > > if [ $whatsthemonth = January -o $whatsthemonth = February -o > $whatsthemonth = March -o $whatsthemonth = April -o $whatsthemonth = > May -o $whatsthemonth = June -o $whatsthemonth = July -o > $whatsthemonth = August -o $whatsthemonth = September -o > $whatsthemonth = October -o $whatsthemonth = November -o > $whatsthemonth = December ] > > than what i did?
case "$whatsthemonth" in January|February|March|...) ...;; esac -- David Dooling http://www.politigenomics.com/ --~--~---------~--~----~------------~-------~--~----~ Central West End Linux Users Group (via Google Groups) Main page: http://www.cwelug.org To post: [email protected] To subscribe: [email protected] To unsubscribe: [email protected] More options: http://groups.google.com/group/cwelug -~----------~----~----~----~------~----~------~--~---
