DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR SHELL
bash if is number
re='^[0-9]+$' if ! [[ $yournumber =~ $re ]] ; then echo "error: Not a number" >&2; exit 1 fi
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#bash
#number
ADD COMMENT
Topic
COMMENT
Name
4+3 =
Submit