Bugzilla ID: 419
Cc: sta...@dpdk.org
Signed-off-by: Sarosh Arif <sarosh.a...@emumba.com>
---
 usertools/dpdk-setup.sh | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/usertools/dpdk-setup.sh b/usertools/dpdk-setup.sh
index e5bbe9fee..bdacf5256 100755
--- a/usertools/dpdk-setup.sh
+++ b/usertools/dpdk-setup.sh
@@ -595,8 +595,14 @@ while [ "$QUIT" == "0" ]; do
        echo -n "Option: "
        read our_entry
        echo ""
-       ${OPTIONS[our_entry]} ${our_entry}
-
+       echo $our_entry | grep "^[0-9]*$" > /dev/null
+
+       if  [ "$?" -eq 0 ] ; then
+               ${OPTIONS[our_entry]} ${our_entry}
+       else
+               echo "Wrong input format"
+       fi
+
        if [ "$QUIT" == "0" ] ; then
                echo
                echo -n "Press enter to continue ..."; read
-- 
2.17.1

Reply via email to