Sponsored Content
Full Discussion: Math Square Root
Top Forums Shell Programming and Scripting Math Square Root Post 97372 by yunus_13_ on Sunday 29th of January 2006 05:59:13 PM
Old 01-29-2006
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 Smilie

or seriously man bc
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

square brackets

I would like to substitute a phrase which contains square brackets. change TO how? Thanks (2 Replies)
Discussion started by: gilead29
2 Replies

2. UNIX for Dummies Questions & Answers

Run non-root script as root with non-root environment

All, I want to run a non-root script as the root user with non-root environment variables with crontab. The non-root user would have environment variables for database access such as Oracle or Sybase. The root user does not have the Oracle or Sybase enviroment variables. I thought you could do... (2 Replies)
Discussion started by: bubba112557
2 Replies

3. UNIX for Dummies Questions & Answers

Area of a square

I am just starting out with bash scripting. I tried a simple script to find the area of a square and it didnt run. #!/bin/bash #script to find area of a square based on user input if then echo " Usage -$0 x " echo " where x is the dimension of the square " exit 1 n1=$1 ... (2 Replies)
Discussion started by: SnydeMz
2 Replies

4. Shell Programming and Scripting

Delete text between square brackets and also delete those square brackets using sed or awk

Hi All, I have a text file which looks like this: computer programming systems engineering I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this: computer programming systems engineering I am using... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies

5. Shell Programming and Scripting

AWK script for standard deviation / root mean square deviation

I have a file with say 50 columns, each containing a whole lot of data. Each column contains data from a separate simulation, but each simulation is related to the data in the last (REFERENCE) column $50 I need to calculate the RMS deviation for each data line, i.e. column 1 relative to... (12 Replies)
Discussion started by: chrisjorg
12 Replies

6. Solaris

Migration of system having UFS root FS with zones root to ZFS root FS

Hi All After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
Discussion started by: sb200
2 Replies

7. Shell Programming and Scripting

Mean square root error from different files

For example, I have files called A.txt and B.txt. A.txt #x yj 1 1 2 4 3 9 4 16 5 25 6 36 7 49 8 64 9 81 10 100B.txt #x ^yj 1 1 2 8 3 27 4 64 5 125 6 216 (2 Replies)
Discussion started by: Tzeronone
2 Replies

8. Shell Programming and Scripting

Square matrix to columns

Hello all, I am quite new in this but I need some help to keep going with my analysis. I am struggling with a short script to read a square matrix and convert it in two collumns. A B C D A 0.00 0.06 0.51 0.03 B 0.06 0.00 0.72 0.48 C 0.51 0.72 0.00 ... (7 Replies)
Discussion started by: EvaAM
7 Replies

9. Shell Programming and Scripting

Calculate root mean square?

Dear friend, I know for a single case, this could be finished quickly with Excel. But if we have hundreds of files, we definitely want to do it with a script or a FORTRAN code. Since I have no knowledge of FORTRAN, I tried to work out a script to do it. The math is very simple. we chose one atom... (4 Replies)
Discussion started by: liuzhencc
4 Replies

10. What is on Your Mind?

The square root code I coded on this site...

Hi all, (mainly Neo)... I keep noticing that the SQRT code I wrote recently for a POSIX shell keeps appearing, (the green colour sticks out like a sore thumb). So I decided to take a look on Google. Guess what? UNIX.COM comes first in Google's listing just from two words, see image... (2 Replies)
Discussion started by: wisecracker
2 Replies
CHECKBASHISMS(1)                                              General Commands Manual                                             CHECKBASHISMS(1)

NAME
checkbashisms - check for bashisms in /bin/sh scripts SYNOPSIS
checkbashisms script ... checkbashisms --help|--version DESCRIPTION
checkbashisms, based on one of the checks from the lintian system, performs basic checks on /bin/sh shell scripts for the possible presence of bashisms. It takes the names of the shell scripts on the command line, and outputs warnings if possible bashisms are detected. Note that the definition of a bashism in this context roughly equates to "a shell feature that is not required to be supported by POSIX"; this means that some issues flagged may be permitted under optional sections of POSIX, such as XSI or User Portability. In cases where POSIX and Debian Policy disagree, checkbashisms by default allows extensions permitted by Policy but may also provide options for stricter checking. OPTIONS
--help, -h Show a summary of options. --newline, -n Check for "echo -n" usage (non POSIX but required by Debian Policy 10.4.) --posix, -p Check for issues which are non POSIX but required to be supported by Debian Policy 10.4 (implies -n). --force, -f Force each script to be checked, even if it would normally not be (for instance, it has a bash or non POSIX shell shebang or appears to be a shell wrapper). --extra, -x Highlight lines which, whilst they do not contain bashisms, may be useful in determining whether a particular issue is a false posi- tive which may be ignored. For example, the use of "$BASH_ENV" may be preceded by checking whether "$BASH" is set. --version, -v Show version and copyright information. EXIT VALUES
The exit value will be 0 if no possible bashisms or other problems were detected. Otherwise it will be the sum of the following error val- ues: 1 A possible bashism was detected. 2 A file was skipped for some reason, for example, because it was unreadable or not found. The warning message will give details. SEE ALSO
lintian(1). AUTHOR
checkbashisms was originally written as a shell script by Yann Dirson <dirson@debian.org> and rewritten in Perl with many more features by Julian Gilbey <jdg@debian.org>. DEBIAN Debian Utilities CHECKBASHISMS(1)
All times are GMT -4. The time now is 08:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy