Sponsored Content
Top Forums Shell Programming and Scripting How can you Test for bad number Post 92264 by zazzybob on Thursday 8th of December 2005 11:18:09 PM
Old 12-09-2005
Use egrep to test...

Code:
read foo
echo "${foo}" | egrep "^[0-9]+$" >/dev/null 2>&1
if [ "$?" -eq "0" ]; then
  echo "Yay"
else
  echo "Nay"
fi

Cheers
ZB
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

bad magic number

Hi, when installing a piece of third part software I get the error "Bad magic number" at one point when it tries to use libraries from the bea tuxedo server. Am I correct that this means that the software is expecting 32bit while I'm on 64bit? Is there a way around it or can it only be solved... (5 Replies)
Discussion started by: rein
5 Replies

2. Shell Programming and Scripting

bad if test

:confused: Bad if test: if returns an error I have changed filename to "filename"s su "$filename" 'filename'' '$filename'' "./filename" "./$filename" error is usually why cant I test the filename? Thanks (4 Replies)
Discussion started by: sharkze
4 Replies

3. Filesystems, Disks and Memory

Bad Magic Number

Dear All, i have a SCSI hard disk drive i'm installing on it solaris 5 and the workstation is sun sparc, i made an image of this H.D using Norton Ghost 6, so i took off the SCSI H.D from the sun workstation and put it on a Compaq server then i booted the server from the Norton Ghost floppy disk... (0 Replies)
Discussion started by: wesweshahaha
0 Replies

4. UNIX for Advanced & Expert Users

Bad Number Error

What is wrong with my syntax, I am getting bad number error. The following lines of code get the value from INI file but the variable is a combination of multiple variables. When compiling all together, I get a bad number error or changing the '((' with '{{' gets me bad substitution error. The... (2 Replies)
Discussion started by: moan71
2 Replies

5. Shell Programming and Scripting

Bad day !! test condition failed --need a one liner to do --help

Hi all this is simple but bad day for me nothing work out .. Problem is that I wan to check the argument passed to my script and accordignly exit or setup ENV variable I have a script name src_cpcp_preproc.sh i want to pass 2 argumet from command line argumet and check it in the script... (13 Replies)
Discussion started by: jambesh
13 Replies

6. Solaris

Bad File Number

System Solaris 8 When I open a CONSOLE window the following starts scrolling: "ServiceCommand: :write: Bad FIle Number" This will continue to scroll without stopping. However, you can type while it is scrolling and login into root and even conduct business within the CONSOLE window. The... (1 Reply)
Discussion started by: Kevin1166
1 Replies

7. Solaris

Solaris 8.2 Bad magic number

I'll keep it fairly straight forward. I work with a Solaris server and magically today it decided to take a dump on me. At first it give a long list of files that couldn't be acessed before terminating the boot process and returning to the 'ok' prompt. Booting in single-user mode allowed me to run... (4 Replies)
Discussion started by: Aon
4 Replies

8. Solaris

cpio: Bad magic number/header.

Hi, i got the following error while unpacking the archive file. cpio -icvd < as_sun_x86_101202_disk2.cpio Disk2/stage/Components/oracle.webdb.wwdoc/10.1.2.0.1/1/DataFiles/wwdoc.jar Disk2/stage/Components/oracle.webdb.wwdoc/10.1.2.0.1/1/DataFiles... (2 Replies)
Discussion started by: malikshahid85
2 Replies

9. Solaris

Bad magic number error

So we have a new to us v240 server with no OS installed. It has an outdated version of OB and ALOM so before we install the OS we want to update both. We have a DVD with the latest OB patch burned on it. We do the boot cdrom command but receive the Bad Magic Number Error. Does an OS need to... (2 Replies)
Discussion started by: dunkpancakes
2 Replies

10. Solaris

Bad magic number in disk label.

This is first time post...found this forum when looking for possible solution to fix my sun pc. Just one day can't boot it already showing the following: Boot device: disk File args: Bad magic number in disk label Can't open disk label package Evaluating: boot Can't open boot device... (40 Replies)
Discussion started by: SHuKoSuGi
40 Replies
HYPERG(3pm)						User Contributed Perl Documentation					       HYPERG(3pm)

NAME
PDL::GSLSF::HYPERG - PDL interface to GSL Special Functions DESCRIPTION
This is an interface to the Special Function package present in the GNU Scientific Library. SYNOPSIS
FUNCTIONS
gsl_sf_hyperg_0F1 Signature: (double x(); double [o]y(); double [o]e(); double c) /* Hypergeometric function related to Bessel functions 0F1[c,x] = Gamma[c] x^(1/2(1-c)) I_{c-1}(2 Sqrt[x]) Gamma[c] (-x)^(1/2(1-c)) J_{c-1}(2 Sqrt[-x]) gsl_sf_hyperg_0F1 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_hyperg_1F1 Signature: (double x(); double [o]y(); double [o]e(); double a; double b) Confluent hypergeometric function for integer parameters. 1F1[a,b,x] = M(a,b,x) gsl_sf_hyperg_1F1 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_hyperg_U Signature: (double x(); double [o]y(); double [o]e(); double a; double b) Confluent hypergeometric function for integer parameters. U(a,b,x) gsl_sf_hyperg_U 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_hyperg_2F1 Signature: (double x(); double [o]y(); double [o]e(); double a; double b; double c) Confluent hypergeometric function for integer parameters. 2F1[a,b,c,x] gsl_sf_hyperg_2F1 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_hyperg_2F1_conj Signature: (double x(); double [o]y(); double [o]e(); double a; double b; double c) Gauss hypergeometric function 2F1[aR + I aI, aR - I aI, c, x] gsl_sf_hyperg_2F1_conj 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_hyperg_2F1_renorm Signature: (double x(); double [o]y(); double [o]e(); double a; double b; double c) Renormalized Gauss hypergeometric function 2F1[a,b,c,x] / Gamma[c] gsl_sf_hyperg_2F1_renorm 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_hyperg_2F1_conj_renorm Signature: (double x(); double [o]y(); double [o]e(); double a; double b; double c) Renormalized Gauss hypergeometric function 2F1[aR + I aI, aR - I aI, c, x] / Gamma[c] gsl_sf_hyperg_2F1_conj_renorm 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_hyperg_2F0 Signature: (double x(); double [o]y(); double [o]e(); double a; double b) Mysterious hypergeometric function. The series representation is a divergent hypergeometric series. However, for x < 0 we have 2F0(a,b,x) = (-1/x)^a U(a,1+a-b,-1/x) gsl_sf_hyperg_2F0 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.14.2 2012-05-30 HYPERG(3pm)
All times are GMT -4. The time now is 12:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy