Issue
I'm trying to validate input in ksh, and would like to know the easiest way to determine if a string is a valid number.
Solution
Have a go with :
case $INPUT in
+([0-9])*(.)*([0-9]) )
# Variable is numeric
;;
*)
# Nope, not numeric
;;
esac
Answered By - FreudianSlip Answer Checked By - Terry (WPSolving Volunteer)