The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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 04:00 PM
Help with a Date Command !!! kumarsaravana_s UNIX for Dummies Questions & Answers 1 05-28-2007 04: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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-09-2000
Astudent Astudent is offline
Registered User
  
 

Join Date: Oct 2000
Posts: 42
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
  #2 (permalink)  
Old 11-10-2000
Neo's Avatar
Neo Neo is online now Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,728
If I was going to print your project, I would write the output of your script to a file instead of the console (screen) and just print the file. For example, if your script is called sh_foo, just do an sh_foo > file.txt Then just print file.txt. Is there any reason you can't do this?

[Edited by Neo on 11-09-2000 at 11:51 PM]
  #3 (permalink)  
Old 11-10-2000
PxT's Avatar
PxT PxT is offline Forum Advisor  
Registered User
  
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:35 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0