![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| date command help | bsandeep_80 | UNIX for Advanced & Expert Users | 4 | 04-30-2008 03:00 PM |
| Help with a Date Command !!! | kumarsaravana_s | UNIX for Dummies Questions & Answers | 1 | 05-28-2007 03:33 PM |
| Date Command -1 | greengrass | UNIX for Dummies Questions & Answers | 4 | 01-24-2007 06:18 PM |
| date command | vshyam4949 | UNIX for Dummies Questions & Answers | 2 | 01-30-2006 11:40 AM |
| Date Command | saldana | UNIX for Dummies Questions & Answers | 2 | 02-05-2004 11:50 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | 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 |
|
|||||
|
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 |
| Sponsored Links | ||
|
|