mos' definitely. what exactly does "i" represent? from what i'm reading here (and what cory told me in-office) it seems to be a word between spaces. if so, that's exactly what i'm looking for. the expression below doesn't look complete... "for i in $(DATE); do" should there be a "each" in the statement? or does the statement only act on the first "i"? or does it not need an "each" because it's implied? sorry, but i'm confrused here. the man pages for BASH are horrible... and thanks for the help! -----Original Message----- From: Jacob Meuser [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 1:06 PM To: [EMAIL PROTECTED] Subject: [EUG-LUG:2193] RE: BASH question On Tue, Aug 14, 2001 at 11:59:52AM -0700, Cory Petkovsek wrote: > var=`date` ; echo $var > Tue Aug 14 11:58:46 2001 > > Multiple results? Please define. > Maybe he's thinking of something like this: (not tested with bash, but should work) #!/bin/sh DATE=`date` for i in ${DATE}; do case ${i} in Mon) echo "It's Monday" ;; Tue) echo "It's Tuesday" ;; PST) echo "Pacific Standard Time" ;; PDT) echo "Daylight savings in effect" ;; esac done -- <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
