Old 15th June 2009, 05:53
medix1313 medix1313 is offline
Junior Member
Join Date: Jun 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need help Linux Scripts

Can some do a few example scripts for me:
I need 2 linux scripts written:
Script 1:
Insert a reference to the bash shell, appropriate comments, and your name as author.
Accept five positional parameters from the command line.
Display all five values on the screen.
Display a usage clause if the incorrect number of values is entered.
Display an average of the five values.
Save the script, close the editor, make the script executable, and then execute the script.

Scritp 2:
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
Save the script, quit the editor, and then make the script executable

Trying to see how this logic works.
Reply With Quote
Sponsored Links
Old 15th June 2009, 16:21
id10t id10t is offline
Senior Member
Join Date: Nov 2008
Posts: 242
Thanks: 2
Thanked 22 Times in 22 Posts

This is homework...

Check http://justlinux.com/nhf/Programming...eat_Sheet.html

and do it yourself...
Reply With Quote
Old 16th June 2009, 11:43
sjau sjau is offline
Local Meanie
Join Date: Apr 2006
Location: Switzerland
Posts: 1,158
Thanks: 4
Thanked 58 Times in 54 Posts

also good to start:

"Common sense is not as common as commonly believed" by sjau

Auto-Install Script for ISPConfig and Horde on a Vanilla Debian Stable

Need more Repos for Ubuntu? Repository Generator
Need more Repos for Debian? Debian Repository Generator
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PPTP causes Postfix reload fpizzinini Server Operation 4 3rd October 2008 20:43
how openVPN uses NDIS API on linux tarun@howtoforge Suggest HOWTO 0 3rd June 2008 10:22
not receiving mail (postfix) lathrodectus General 7 28th June 2006 15:12
Problems installing NForce4 sound drivers Wraithfire Installation/Configuration 21 16th April 2006 18:30
KErnel not showing all my memory Jorem Kernel Questions 8 13th April 2006 13:59

All times are GMT +2. The time now is 01:15.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.