Unix/Linux Go Back    

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

Homework & Coursework Questions

Thread Tools Search this Thread Display Modes
Old Unix and Linux 04-15-2018   -   Original Discussion by UniverseCloud
UniverseCloud's Unix or Linux Image
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
Old Unix and Linux 04-16-2018   -   Original Discussion by UniverseCloud
RudiC's Unix or Linux Image
RudiC RudiC is offline Forum Staff  
Join Date: Jul 2012
Last Activity: 22 June 2018, 4:36 AM EDT
Location: Aachen, Germany
Posts: 12,916
Thanks: 429
Thanked 3,966 Times in 3,647 Posts
Any idea on how to proceed with the (more elegant?) case method?
Sponsored Links
Old Unix and Linux 04-16-2018   -   Original Discussion by UniverseCloud
rbatte1's Unix or Linux Image
rbatte1 rbatte1 is offline Forum Staff  
Root armed
Join Date: Jun 2007
Last Activity: 21 June 2018, 9:53 AM EDT
Location: Lancashire, UK
Posts: 3,559
Thanks: 1,566
Thanked 699 Times in 627 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.

Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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:23 AM.