<p>How do I check to see if a variable is a number, or contains a number, in UNIX shell?</p>

Shell variables have no type, so the simplest way is to use the return type
```
test
```
command:
```
```
if [ $var -eq $var 2> /dev/null ]; then ...
```
```
(Or else parse it with a regexp)