The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Passing the values to the secondary script when it invoked by primary script venu_eie UNIX for Advanced & Expert Users 2 07-03-2008 08:10 AM
Passing the values to the secondary script when it invoked by primary script venu_eie Shell Programming and Scripting 1 07-03-2008 07:16 AM
create a shell script that calls another script and and an awk script magikminox Shell Programming and Scripting 0 06-26-2008 03:50 AM
help me in sending parameters from sqlplus script to unix shell script Hara Shell Programming and Scripting 2 01-29-2008 03:31 PM
Shell Script: want to insert values in database when update script runs ring Shell Programming and Scripting 1 10-25-2007 04:06 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-15-2008
tweak tweak is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 4
Need a lot of help with a script

First off just would like to say hello I'm new to this forum but it looks very interesting and I'm sure I will learn a lot from the various people here.

I'm new to UNIX and more so scripting in it. I have an assignment for a class that's mostly done online and my teacher is of no help whatsoever telling us he would review steps to do it and hasn't. My group including me is clueless on how to accomplish our task I could really use a hand. We are using Putty and writing the scripts using VI

1-
I need to write this particular script using the korn shell. It will take a number from the command line and perform the math in section 2(below). If no command line argument is given, the script should ask for a number between 1 and 20.

2-
The out of the script needs to be
a) The number
b) The square of the inputted number
c) The cube of the number
d) The square root of the number derived from (c)

So for example...It will ask
Please enter a number: "input 1-20"
You entered the number "XX"
The Square root of your number is "XXX"
The Cube of your number is "XXXXX"
The Qquare root of "XXXX" is "XX"

There's more kickers like if the number you enter isn't 1-20 it clears the screen and asks again for a number. Having an exit for a user other than entering a number. Using at least 1 sub function. Oye my head hurts just typing it.

Any help is seriously honestly appreciated.
 

Bookmarks

Tags
homework

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:09 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0