Solved

Knoppix Commands

Posted on 2006-07-12
3
1,351 Views
Last Modified: 2011-10-03
Hello experts, I am trying to go through a series of exercises to help me understand Linux running on a Live CD of Knoppix. Can you help with the commands I need to utilize?


  2. Create a shell script in your home 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.
0
Comment
Question by:mayan1
3 Comments
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 50 total points
ID: 17095044
This is homework, right? All the same, here are the tools you would use
2. with a text editor, such as vi or emacs. Use chmod to make the script executable
3. Use bash's "read" command - bash has help for its internal commands so you can type e.g. "help read" at the shell prompt. "man bash" or "info bash" gives you he full works, including how to do arithmetic.
4. see 2.
5. You can always invoke a script by pathname (e.g. ./script) even if . is not in your PATH
6. Look up output redirection
7. see 5.
8. see 6
9. see 5
10. see 6

good luck ;)
0
 

Author Comment

by:mayan1
ID: 17096069
I just wanted to see examples of how these are invoked. It does have to be exactly as stated but examples.
0
 
LVL 40

Expert Comment

by:noci
ID: 17097209
PLease read this first....
http://www.experts-exchange.com/Programming/Programming_Platforms/Linux_Programming/help.jsp#hi130

Then following up on the above leads should help, if you don't under stand them then try to find
& read the resp. manual pages. Trust me it doesn't hurt to read documentation..., dropping them on your toes might
if they're of the paper type.


These might help
http://www.oreilly.com/catalog/1593270348/index.html
http://www.oreilly.com/catalog/1593270313/index.html

This is a gem:
http://www.oreilly.com/catalog/knoppixhks/index.html

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now