The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
need script to convert number in hexadecimal mips Shell Programming and Scripting 5 11-08-2008 12:24 PM
convert cpp program to c shell script ? domain Shell Programming and Scripting 2 12-12-2007 06:43 AM
Convert shell script for looping le0pard13 Shell Programming and Scripting 4 06-07-2007 08:42 PM
Script to move certain number of files every 10 minutes. amitsayshii UNIX for Dummies Questions & Answers 1 02-26-2007 04:55 AM
Convert minutes to hours, minutes, seconds Vozx Shell Programming and Scripting 1 12-09-2005 01:24 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 08-07-2003
Ringo Ringo is offline
Registered User
  
 

Join Date: Aug 2003
Posts: 3
C Shell Script to convert a number into minutes

Could anyone tell me how to write a C shell script according to the following requirement.

Write a C shell script convertmin which will read in a number, thought of as representing minutes, and print out the number of hours/minutes it represents so:

Note: you are required to check exception cases: such as negative number, whether the input is numeric, etc

$ convertmin
Enter a number of minutes:
128

Result
128 minutes is 2 hours and 8 minutes
  #2 (permalink)  
Old 08-07-2003
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Ringo,

You might want to look at the rules of this forum. Once you have, please explain the business application of the script you are trying to write.

Most of the time we don't write scripts for people but we do help when they have a script that doesn't work. Most of the time we can tell if a question has to do with business or a business application. I get the feeling this is not one of those times.
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 09:03 PM.


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