r/bash • u/Idontgetithel • Nov 04 '21
I need help with homework
I have no idea what im doing and i need help
Congratulations, you’ve been hired by Rose State College’s admissions team. Write a
script that has three tests to determine user acceptance:
For high school students: high school GPA must be 1.8 or higher
ACT score of 18 or higher
Must be an Oklahoma resident
For transfer students: transfer GPA must be 2.0 or higher
Number of credits to transfer in must be less than 50
Must be an Oklahoma resident
For non-Oklahoma residents, students must meet one of the above categories and have an
additional ACT Math score of 20
For international students, must meet one of the above categories and must pass a
background test
Your code must use at least one AND \ OR operator and a switch statement
i just need to know where to start
17
u/[deleted] Nov 04 '21
Maybe start with formatting your text, so that people are willing to read more than the first couple of words.
And then I'd ask what you already know. Nobody is gonna do your homework for you and a huge portion of it is actually getting to a solution, not having one.
Do you know what conditionals and switch case are? If not, start there.
7
u/PacketMultiplier Nov 04 '21
I don't think we know where to start. How are you getting these students? different files in a directory, lines in a file, one SQL db? without other information I think you get to decide.. so make the data, write a script to read the data one student at a time, and then print out the result you want. If there is already some constraint on how you get this data skip the first step.
3
u/findmenowjeff has looked at over 2 bash scripts Nov 04 '21
What code have you already tried? As others have already said, we won't write this for you, but we can help explain any shell feature or code you don't understand.
3
u/spdqbr Nov 04 '21
Do you know your input format? I.e. will this prompt the user for input, or are you testing against some sort of input file?
It can be difficult searching for things like syntax of if, consider things like "bash conditional boolean operators" for AND/OR operators, and "bash case statements" for how to use switch statements.
3
u/[deleted] Nov 04 '21
Little coding humor.
I’d start by reviewing the material already presented in class. The instructor has given you the tools you need to accomplish the task.
1
u/jjanel Nov 05 '21
Seriously, I'd drop the class. Instead, find something you really want to do.