Tighten numeric regex

This commit is contained in:
vr8ce 2020-06-19 22:56:55 -05:00
parent 6ccd2fa439
commit 27f42beb81

View file

@ -64,7 +64,7 @@ EOL
;;
esac
if [[ ! $parm2 =~ [1-9]*([0-9]) ]]; then
if [[ ! $parm2 =~ ^[1-9][0-9]*$ ]]; then
echo "Invalid undo count: $parm2"
exit 1
fi