Horje
bash if is number Code Example
bash if is number
re='^[0-9]+$'
if ! [[ $yournumber =~ $re ]] ; then
   echo "error: Not a number" >&2; exit 1
fi
check if variable is a number in bash
re='^[0-9]+$'
if ! [[ $yournumber =~ $re ]] ; then
   echo "error: Not a number" >&2; exit 1
fi




Shell

Related
restart a pod kubernetes Code Example restart a pod kubernetes Code Example
install x centos 7 Code Example install x centos 7 Code Example
inkscape ubuntu ppa Code Example inkscape ubuntu ppa Code Example
install inkscape ubuntu 20.04 Code Example install inkscape ubuntu 20.04 Code Example
git revert changes in last commit Code Example git revert changes in last commit Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12