Unix/Linux Go Back    


Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

Math Square Root

Shell Programming and Scripting


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 01-29-2006
davex4285 davex4285 is offline
Registered User
 
Join Date: Jan 2006
Last Activity: 20 February 2006, 8:26 PM EST
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Math Square Root

Hi I just stumbled on to these forums today, and I relatively new to unix. I am trying to figure out how to find the square root of a number using a shell script. I am using bash and I have searched and searched but cannot figure out square roots. Hopefully someone can point me in the right direction this is driving me crazy.

Last edited by davex4285; 01-29-2006 at 07:34 PM..
Sponsored Links
    #2  
Old Unix and Linux 01-29-2006
yunus_13_ yunus_13_ is offline
Registered User
 
Join Date: Jan 2006
Last Activity: 7 February 2006, 6:39 PM EST
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by davex4285
Hi I just stumbled on to these forums today, and I relatively new to unix. I am trying to figure out how to find the square root of a number. I am using bash and I have searched and searched but cannot figure out square roots. Hopefully someone can point me in the right direction this is driving me crazy.
code your my_square_root.c

just a joke Unix or Linux Image

or seriously man bc
Sponsored Links
    #3  
Old Unix and Linux 01-29-2006
davex4285 davex4285 is offline
Registered User
 
Join Date: Jan 2006
Last Activity: 20 February 2006, 8:26 PM EST
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
I guess I should have made my post a little more clear. In my unix system administration class we have to write a script to do multiple calculations on a number. And one of the calculations is to find the square root. I asked my professor and he told me to search google for bash math functions, but that came up empty.
    #4  
Old Unix and Linux 01-29-2006
Perderabo's Unix or Linux Image
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 7 April 2015, 12:31 PM EDT
Location: Ashburn, Virginia
Posts: 9,931
Thanks: 64
Thanked 446 Times in 263 Posts
Please read our rules. Note:
(6) Do not post classroom or homework problems.

"he told me to search google for bash math functions, but that came up empty."
"Results 1 - 10 of about 442,000 for bash math functions. (0.21 seconds)"
And I found many results that were quite on target. But be that as it may, I will close this thread since it violates the rules.
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
AWK script for standard deviation / root mean square deviation chrisjorg Shell Programming and Scripting 12 01-18-2012 11:30 AM
Delete text between square brackets and also delete those square brackets using sed or awk shoaibjameel123 Shell Programming and Scripting 3 05-05-2011 01:41 AM
Area of a square SnydeMz UNIX for Dummies Questions & Answers 2 07-22-2010 05:44 AM
least-square fit in Gnuplot cosmologist UNIX for Dummies Questions & Answers 6 05-18-2009 05:07 PM
square brackets gilead29 UNIX for Dummies Questions & Answers 2 02-03-2004 10:29 AM



All times are GMT -4. The time now is 01:35 PM.