Shifting through the elements of "date" - Bourne Shell

I'm not really sure how to start doing this... but i have to write a script that saves the current date in a variable and then shifts through the different parts/elements of the date using a loop and prints each one out in a separate line.

If anyone can just point me out what to research so I can get started with this i'd be thankful... at the moment i'm kinda clueless on how to do this.  would I be using grep or something?
nocturn4lAsked:
Who is Participating?
 
ozoCommented:
date=`date`
for d in $date ;  do echo $d ; done
0
 
nocturn4lAuthor Commented:
thanks, gonna look into that right now, gonna keep this post open for now till i get that done. thanks again
0
 
nocturn4lAuthor Commented:
ah wow that works... i didn't understand how at first but just went over the for..do..done part of my book and it makes sense.. dont think i would've came up with that myself otherwise.  thanks a million
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.