Imported from ../bash-2.04.tar.gz.

This commit is contained in:
Jari Aalto
2009-09-12 16:46:53 +00:00
parent b72432fdcc
commit bb70624e96
387 changed files with 28522 additions and 9334 deletions
+30 -1
View File
@@ -11,7 +11,7 @@
# BASH NOTE: make sure you have executed `shopt -s extglob' before
# trying to use this function, or it will not work
function isnum # string
isnum() # string
{
case $1 in
?([-+])+([0-9])?(.)*([0-9])?([Ee]?([-+])+([0-9])) )
@@ -21,3 +21,32 @@ function isnum # string
*) return 1;;
esac
}
isnum2() # string
{
case $1 in
?([-+])+([[:digit:]])?(.)*([[:digit:]])?([Ee]?([-+])+([[:digit:]])) )
return 0;;
?([-+])*([[:digit:]])?(.)+([[:digit:]])?([Ee]?([-+])+([[:digit:]])) )
return 0;;
*) return 1;;
esac
}
isint() # string
{
case $1 in
?([-+])+([0-9]) )
return 0;;
*) return 1;;
esac
}
isint2() # string
{
case $1 in
?([-+])+([[:digit:]]) )
return 0;;
*) return 1;;
esac
}