UNIX Help. Please help I'm confused on these two problems.

  • gnc3283
  • Born
  • Born
  • gnc3283
  • Posts: 1

Post 3+ Months Ago

In this project, you will perform exponentiation in interactive scripts using the read
command to accept two variables and then raise one to the power of the other.Once
the answer is displayed,you will unset all variables using the unsetcommand.
1. Log in to the Linux system as a user,and then open a Terminal emulation window.
2. Create a script named Project5-5in the $HOME/bindirectory.
3. Declare three variables as integer,x,y,and A.Read x and y in from the keyboard.
Compute the answer,A,as x raised to the ythpower,and then display the answer.
4. Unset the variable with the unsetcommand.
5. Save the script,close the editor,make the script executable,and then execute
the script.
6. Close your window,and then log out. Project



and

In this project, you will convert pseudocode that uses a decision structure into a shell
script. The script then will accept three grades, calculate an average, and then display a
letter grade based upon the average.You will need to use either the if statement or the
case statement to implement this script.
1. Log in to the Linux system as a user, and then open a Terminal
emulation window.
2. Create a shell script named Project6-4 in your $HOME/bin directory.
3. Convert the following pseudocode into code for the script:
Read in three grades from the keyboard
Average the grades
Display the appropriate letter grade for the number grade using this scale:
90 to 100: Display a letter grade of “A”
80 to 89: Display a letter grade of “B”
70 to 79: Display a letter grade of “C”
65 to 69: Display a letter grade of “D”
0 to 64: Display a letter grade of “F”
Insert appropriate comments
4. Save the script, quit the editor, and then make the script executable.
5. Execute the script and then input 100, 90, and 100 when prompted for each grade.
6. Record the output.
7. Execute the script again.This time input 99, 68, and 70 when prompted for
each grade.
8. Record the output.
9. Execute the script one last time. Input 80, 96, and 72 when prompted for
each grade.
10. Record the output.
11. Close your window, and then log out.


I'm new to this and I know this may seem easy to most of you but I thank you for the help
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Cae
  • Expert
  • Expert
  • User avatar
  • Posts: 734

Post 3+ Months Ago

What specific problems are you having? People here are more than willing to lend you a hand, but I doubt anyone is going to do your Scripting 101 assignments for you...
  • httpftp21
  • Graduate
  • Graduate
  • httpftp21
  • Posts: 101

Post 3+ Months Ago

Hey gnc

first give a try by ur self
then we r here 2 help u out as mentioned by Cae

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 77 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.