Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Negative Numbers for input parameters. Post 302335842 by Gussifinknottle on Monday 20th of July 2009 03:39:22 PM
Old 07-20-2009
Hi BubbaJoe,

Actually the flag is for a command that is in a shell script. It just tells me that the flag value is unrecognized and the command gets aborted.

The command is supposed to take both -ve and +ve values and works fine when the latter is supplied.

Thanks,
Gussi
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Input parameters

I have a script which take 3 input parameters 1st - a date (i.e. current date) 2nd - type (i.e. A) 3rd - limit (i.e. 40) normally the date parameter would be current date, so I thought I could do this calculate.sh $(date +%Y-%m-%d) A 40 however, it seems like it can't be done,... (3 Replies)
Discussion started by: mpang_
3 Replies

2. UNIX for Dummies Questions & Answers

Negative Numbers and If Statements

Hi, Can anyone explain what is going on here: michael-browns-powerbook-g4-15:~ msb65$ start=-1 michael-browns-powerbook-g4-15:~ msb65$ stop=1 michael-browns-powerbook-g4-15:~ msb65$ if ; then echo hello; fi -bash: ; then echo hello; fi hello Are you not allowed to compare negative... (6 Replies)
Discussion started by: msb65
6 Replies

3. Shell Programming and Scripting

Perl output with negative and positive numbers

Hello, For my weather station I have made a little perl script to put the data into cacti. The next problem I have. I can only get positive numbers or negative numbers. What do I do: Though a shell scrip I call the perl script. Shell script: #!/bin/sh cat data.txt | stats.pl Perl... (4 Replies)
Discussion started by: rbl-blacklight
4 Replies

4. Shell Programming and Scripting

addition of both positive and negative numbers

Let, I have three numbers +00123.25 -00256.54 +00489.23 I need to sum up all those three numbers, after storing them in three variables (say var1, var2, var3). I used both expr and BC, but they didn't work for me. But, I am not able to sum up them, as I don't have any idea how to... (13 Replies)
Discussion started by: mady135
13 Replies

5. Shell Programming and Scripting

Comparing Negative Numbers with If/Else

ValA=-29344 if ; then echo "NEGATIVE" else echo "POSITIVE" fi Can someone please tell me how else they would go about doing the above? When i do it, i get errors such as: (10 Replies)
Discussion started by: SkySmart
10 Replies

6. Shell Programming and Scripting

Splitting a file based on positive and negative numbers

Dear All, I have to split a tab delimited file in two files based on the presence of a positive or negative in column number 9 , for example file: A 1 5 erg + 6766 0.9889 0.9817 9.01882 erg inside upstream B 1 8 erg2 + 6766 0.9889 0.9817 -9.22 erg2 inside... (3 Replies)
Discussion started by: paolo.kunder
3 Replies

7. UNIX for Dummies Questions & Answers

Sed/awk to find negative numbers and replace with 1?

Greetings. I have a three column file, and there are some numbers in the second column that are <1. However I need all numbers to be positive, thus need to replace all those numbers with just one. I feel like there must be a simple way to use awk to find these numbers and sed to replace but can't... (5 Replies)
Discussion started by: Twinklefingers
5 Replies

8. AIX

Input parameters

friends and I can validate whether to run the shell has input parameters m event date, I occasionally happen something like this does not work if $ 1 is null then echo has entered input parameters else echo "parameter ok" fi (2 Replies)
Discussion started by: tricampeon81
2 Replies

9. UNIX for Dummies Questions & Answers

Sorting numerically considering both negative and positve numbers

Dear Experts, I have an IP file which looks like below ---- 100 200 5.02 100 200 -2.99 100 200 -3.01 200 300 2.05 200 300 3.01 200 300 -5.06 I want an OP which looks like (decreasing numerically)-- 100 200 5.02 100 200 -2.99 100 200 -3.01 200 300 3.01 200 300 2.05 200 300 -5.06 (2 Replies)
Discussion started by: Indra2011
2 Replies

10. UNIX for Beginners Questions & Answers

Splitting a file based on negative and positive numbers

I have a file that is pipe delimited and in Column F they have number values, both positive and negative. I need to take the one file I am starting with and split it into two separate files based on negative and positive numbers. What is the command to do so? And then I need to also transfer... (4 Replies)
Discussion started by: cckaiser15
4 Replies
GAMMA(3)						User Contributed Perl Documentation						  GAMMA(3)

NAME
PDL::GSLSF::GAMMA - PDL interface to GSL Special Functions DESCRIPTION
This is an interface to the Special Function package present in the GNU Scientific Library. SYNOPSIS
Functions FUNCTIONS
gsl_sf_lngamma Signature: (double x(); double [o]y(); double [o]s(); double [o]e()) Log[Gamma(x)], x not a negative integer Uses real Lanczos method. Determines the sign of Gamma[x] as well as Log[|Gamma[x]|] for x < 0. So Gamma[x] = sgn * Exp[result_lg]. gsl_sf_lngamma does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_gamma Signature: (double x(); double [o]y(); double [o]e()) Gamma(x), x not a negative integer gsl_sf_gamma does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_gammastar Signature: (double x(); double [o]y(); double [o]e()) Regulated Gamma Function, x > 0 Gamma^*(x) = Gamma(x)/(Sqrt[2Pi] x^(x-1/2) exp(-x)) = (1 + 1/(12x) + ...), x->Inf gsl_sf_gammastar does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_gammainv Signature: (double x(); double [o]y(); double [o]e()) 1/Gamma(x) gsl_sf_gammainv does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_lngamma_complex Signature: (double zr(); double zi(); double [o]x(); double [o]y(); double [o]xe(); double [o]ye()) Log[Gamma(z)] for z complex, z not a negative integer. Calculates: lnr = log|Gamma(z)|, arg = arg(Gamma(z)) in (-Pi, Pi] gsl_sf_lngamma_complex does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_taylorcoeff Signature: (double x(); double [o]y(); double [o]e(); int n) x^n / n! gsl_sf_taylorcoeff does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_fact Signature: (x(); double [o]y(); double [o]e()) n! gsl_sf_fact does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_doublefact Signature: (x(); double [o]y(); double [o]e()) n!! = n(n-2)(n-4) gsl_sf_doublefact does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_lnfact Signature: (x(); double [o]y(); double [o]e()) ln n! gsl_sf_lnfact does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_lndoublefact Signature: (x(); double [o]y(); double [o]e()) ln n!! gsl_sf_lndoublefact does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_lnchoose Signature: (n(); m(); double [o]y(); double [o]e()) log(n choose m) gsl_sf_lnchoose does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_choose Signature: (n(); m(); double [o]y(); double [o]e()) n choose m gsl_sf_choose does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_lnpoch Signature: (double x(); double [o]y(); double [o]s(); double [o]e(); double a) Logarithm of Pochammer (Apell) symbol, with sign information. result = log( |(a)_x| ), sgn = sgn( (a)_x ) where (a)_x := Gamma[a + x]/Gamma[a] gsl_sf_lnpoch does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_poch Signature: (double x(); double [o]y(); double [o]e(); double a) Pochammer (Apell) symbol (a)_x := Gamma[a + x]/Gamma[x] gsl_sf_poch does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_pochrel Signature: (double x(); double [o]y(); double [o]e(); double a) Relative Pochammer (Apell) symbol ((a,x) - 1)/x where (a,x) = (a)_x := Gamma[a + x]/Gamma[a] gsl_sf_pochrel does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_gamma_inc_Q Signature: (double x(); double [o]y(); double [o]e(); double a) Normalized Incomplete Gamma Function Q(a,x) = 1/Gamma(a) Integral[ t^(a-1) e^(-t), {t,x,Infinity} ] gsl_sf_gamma_inc_Q does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_gamma_inc_P Signature: (double x(); double [o]y(); double [o]e(); double a) Complementary Normalized Incomplete Gamma Function P(a,x) = 1/Gamma(a) Integral[ t^(a-1) e^(-t), {t,0,x} ] gsl_sf_gamma_inc_P does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_lnbeta Signature: (double a(); double b(); double [o]y(); double [o]e()) Logarithm of Beta Function Log[B(a,b)] gsl_sf_lnbeta does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. gsl_sf_beta Signature: (double a(); double b();double [o]y(); double [o]e()) Beta Function B(a,b) gsl_sf_beta does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. AUTHOR
This file copyright (C) 1999 Christian Pellegrin <chri@infis.univ.trieste.it> All rights reserved. There is no warranty. You are allowed to redistribute this software / documentation under certain conditions. For details, see the file COPYING in the PDL distribution. If this file is separated from the PDL distribution, the copyright notice should be included in the file. The GSL SF modules were written by G. Jungman. perl v5.12.1 2010-07-05 GAMMA(3)
All times are GMT -4. The time now is 04:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy