![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| date command help | bsandeep_80 | UNIX for Advanced & Expert Users | 4 | 04-30-2008 12:00 PM |
| Help with a Date Command !!! | kumarsaravana_s | UNIX for Dummies Questions & Answers | 1 | 05-28-2007 12:33 PM |
| Date Command -1 | greengrass | UNIX for Dummies Questions & Answers | 4 | 01-24-2007 02:18 PM |
| date command | vshyam4949 | UNIX for Dummies Questions & Answers | 2 | 01-30-2006 07:40 AM |
| Date Command | saldana | UNIX for Dummies Questions & Answers | 2 | 02-05-2004 07:50 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Ok,
I figured out how to code my LCD clock program the only problem I am now having is - making it print out. I have my for loops and case statements in my program and after that I need to print out the time I know how to use the date with the cut command. But I am unsure on how to link my statements so that the time is printed out, after the case statements. A |
| Forum Sponsor | ||
|
|
|
||||
|
Are you talking about printing it to the screen, or printing out a hard copy?
If you mean to the screen, then you might have something like: Code:
FOO=`date +%H|cut -c1`
case $FOO in
2) echo "<some text>"
;;
3) echo "<some text>"
;;
esac
I dont know how your program is set up, but it sounds like you are using case statements. You would put the output (echo) in the appropriate portion of the case. Read the bash or ksh man page for information on how to use the case statement. I would recommend that you pick up a good Unix book that includes a section on shell scripting. Several have been recommended in different threads recently on this board. HTH |
||||
| Google UNIX.COM |