×
UNIX.COM Login
Username:
Password:  
Show Password






👤


Homework & Coursework Questions

Students must use and complete the template provided. If you do not use the template your post may be deleted! Special homework rules apply here.

Grades exercise

👤 Login to reply
 
Thread Tools Search this Thread Display Modes
    #8  
Old 04-15-2018
UniverseCloud UniverseCloud is offline
Registered User
 
Join Date: Apr 2018
Last Activity: 23 April 2018, 1:28 PM EDT
Posts: 7
Thanks: 4
Thanked 0 Times in 0 Posts
OMG! i should have known.. thank you!
Sponsored Links
    #9  
Old 04-16-2018
RudiC RudiC is offline Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 17 July 2018, 4:35 AM EDT
Location: Aachen, Germany
Posts: 13,065
Thanks: 448
Thanked 4,012 Times in 3,689 Posts
Any idea on how to proceed with the (more elegant?) case method?
Sponsored Links
    #10  
Old 04-16-2018
rbatte1 rbatte1 is online now Forum Staff  
Root armed
 
Join Date: Jun 2007
Last Activity: 17 July 2018, 5:50 AM EDT
Location: Lancashire, UK
Posts: 3,585
Thanks: 1,592
Thanked 706 Times in 633 Posts
The problem in the case options you have defined is probably that it will be matching a regular (textual) expression, not a numeric range. Consider the characters that your variable is range than the value.


Does that help? A good case statement can make a wonderful replacement to if...then...elif...elif...elif...fi or lots of separate and confusing if statements. Just as good programming technique, your should follow this though and I would expect you would to get a better mark if you can crack it.



Robin
Sponsored Links
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
UNIX Exercise stew UNIX for Dummies Questions & Answers 1 03-13-2014 09:11 AM
Help with this exercise bunkercrazy Homework & Coursework Questions 1 01-23-2010 10:00 PM
Reading 5 Students names and grades using while loop???? dlbomber1 Shell Programming and Scripting 1 11-26-2007 01:46 AM



All times are GMT -4. The time now is 05:59 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.