Solved

Knoppix Commands

Posted on 2006-07-12
3
1,356 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux 10 111
Problem to start Neon 20 120
BASH script to modify crontab? 3 79
WiFi Router device supports GPON! 3 86
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 fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

861 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