when declaring a variable e.g.
export DAYS
what checking / how can i check that the value assigned only contains numeric characters or integers ?
when declaring a variable e.g.
export DAYS
what checking / how can i check that the value assigned only contains numeric characters or integers ?
Use:
typeset -i VARIABLE=value
That will guarantee that it is an integer. Trying to assign a string to the variable will result in the value being set to zero.