All pastes #612721 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-07-10 16:01 UTC
rendered paste body
test_if_number()
# usage: test_if_number INPUt
# returns true or false exit code ( 0 or 1 )
{
    [[ $1 && $1 =~ ^[-+]?[0-9]*\(\.[0-9]+\)?$ ]]
}