Showing posts with label test number ksh k shell unix. Show all posts
Showing posts with label test number ksh k shell unix. Show all posts

Friday, June 4, 2010

Testing for a number in the ksh

Quick script for testing for a number in the ksh
#!/bin/ksh

if [[ $1 = ?([+-])+([0-9]) ]]; then
echo "true";
else
echo "false";
fi