#!/bin/bash
# Scriptname: wholenum
# Purpose:The expr command tests that the user enters an
# integer -- bash shell
echo "Enter an integer."
read number
if expr "$number" + 0 >& /dev/null
then
:
else
echo "You did not enter an integer value."
exit 1
fi
阅读(540) | 评论(0) | 转发(0) |