Linux Shell Programming Projec

Here are the details of the project:

It is 3 parts as described below. The pseudo code needs to be turned into a script. The script and captured output need to be provided.

Part 1:
1. Create a shell script located in your home directory.
2. Convert the pseudocode below into an executable script. Following the same order
3. Save the file.
4. Execute the script.
5. Provide script and captured output.

Pseudocode –

· Change to the /tmp directory
· Change to your home directory
· Display the previous working directory using a shell variable
· Display your home directory using a shell variable
· Display your home directory using an alternate method to using a shell variable
· Display the amount of time the shell will wait for user input before the current shell is terminated using a shell variable
· Set the previous variable to 120
· Display the amount of time the shell will wait for user input before the current shell is terminated using a shell variable
· Set the previous variable to 0

Part 2:

1. Create a shell script in your home directory.
2. Convert the pseudocode below into a script.
3. Save the script.
4. Execute the script and input the 3 grades when prompted.
5. Provide script and captured output for assignment.

Pseudocode –

· Read in 3 grades from the keyboard
· Average the grades
· Display the appropriate letter grade for the number grade using this scale:
o 90 to 100: Display a grade of “A”
o 80 to 89: Display a grade of “B”
o 70 to 79: Display a grade of “C”
o 65 to 69: Display a grade of “D”
o 0 to 64: Display a grade of “F”

Part 3:

Take the script from Part 3 and add a looping structure to it. Apply the looping structure to the portion of the script where the user is asked to enter the grade.

Leave a Reply

Your email address will not be published. Required fields are marked *