Solved

Knoppix Commands

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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
Mounting Linux Partition.... 30 371
File system unmounted 3 163
Prestashop 1.5 Redirect Problem 1 125
ACL in Solaris 10 & AIX V6.1 to circumvent application required  grp:rwx 9 121
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…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

749 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