Solved

Knoppix Commands

Posted on 2006-07-12
3
1,362 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

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…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

751 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