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


Reply    
 
Thread Tools Search this Thread Display Modes
    #8  
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
    #9  
Old Unix and Linux 04-16-2018   -   Original Discussion by UniverseCloud
RudiC's Unix or Linux Image
RudiC RudiC is offline Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 21 May 2018, 6:55 AM EDT
Location: Aachen, Germany
Posts: 12,716
Thanks: 412
Thanked 3,910 Times in 3,596 Posts
Any idea on how to proceed with the (more elegant?) case method?
Sponsored Links
    #10  
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 May 2018, 11:17 AM EDT
Location: Lancashire, UK
Posts: 3,534
Thanks: 1,557
Thanked 692 Times in 622 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
Reply

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 12:50 PM.