Solved

Knoppix Commands

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

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

20 Experts available now in Live!

Get 1:1 Help Now