From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 30BD7A0583 for ; Thu, 19 Mar 2020 18:45:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1EA43FEB; Thu, 19 Mar 2020 18:45:24 +0100 (CET) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) by dpdk.org (Postfix) with ESMTP id 0D3A1FEB for ; Thu, 19 Mar 2020 18:45:23 +0100 (CET) Received: by mail-lj1-f179.google.com with SMTP id o10so3481494ljc.8 for ; Thu, 19 Mar 2020 10:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emumba-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=sehX5vfcqqiNEan+Wqs8YeajNwnmeSdXa0g+OShLUkg=; b=hBQLX0pkHBAuFoza/f0jddiSVAxhZGSuBsUp5+Qt//VZSpNGVM0ukSVekS6A3f2thT gCU+P3Mw7BCv6ypzSaMmiGoq94htsMAfHWLYGl5Qq4OuLtK6cpXA3nedkBoAiUgakyth GTwC5Rml9BJohPnXWYYYU4fFLA82fxe963Yedqt4+hA9QcAYmPnTKw3h8QwtjvRBEJkm bxRFVMZBAlBUuaVNT8rtYQ2mIRAOv9Xpj472/D4MAzJ9uF1ItMnn5YICIkNzq7ASSQBL 9pAA3x76PmEJfis1n+xLv8GriIxZlRlVxwdM811SU1NAzisoQaJEFbYdDXBnIC6CK6+1 9OQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sehX5vfcqqiNEan+Wqs8YeajNwnmeSdXa0g+OShLUkg=; b=tNpvF2rothnLIjKUEqQA//paRZYxh0GZOeO1nAu8r90X8FfgljoSfwGt2DLieXa5nT rKx7lzq4RUsBpC47HdEcbmF1fnLvpNGr05Y/VBL6hSm5ukKCQ/z6dt3A0/YQ+pUFvx3+ i+ZjEzZHBwmenCX1b791lsXF24ny4SugXwpisslIPbKiX52FRy8XRkZHdgmU776v0lyo mIRUDrrVHIK8xwD+bR5+EiLwPTVZxwdAV2bL2xCMfUDQxPD1ky3ejMAyQ5Yt9uZVtKG6 lsSgcTB1e9pBAnNZA2xIAzuU+LC2RyvUPZqQDYs2XKLFWK25rXP6tw5DTeTzqLUie/Tt cvYw== X-Gm-Message-State: ANhLgQ3nlqvl2E1wKExfqXEe1wXXoqmK215NWm1X5QRqHrpk9Ltp2oIr FJsxxRPdjOy/yg0hcPWOUdGX5A== X-Google-Smtp-Source: ADFU+vuJdHMnIKy4CRoH6sbm/Qbj9JHNc/v8OplqYeVe+SqQsASZ7XAjYTHTFQoYfz/dPkwrhGWSHg== X-Received: by 2002:a2e:9602:: with SMTP id v2mr2882761ljh.236.1584639922665; Thu, 19 Mar 2020 10:45:22 -0700 (PDT) Received: from localhost.localdomain ([39.40.48.67]) by smtp.gmail.com with ESMTPSA id r12sm2011895ljd.6.2020.03.19.10.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 10:45:21 -0700 (PDT) From: Sarosh Arif To: dev@dpdk.org Cc: Sarosh Arif , stable@dpdk.org Date: Thu, 19 Mar 2020 22:44:23 +0500 Message-Id: <20200319174423.28378-1-sarosh.arif@emumba.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-stable] [PATCH v1] usertools/dpdk-setup.sh: fix dpdk-setup's behaviour on non-alphanumeric inputs X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Bugzilla ID: 419 Cc: stable@dpdk.org Signed-off-by: Sarosh Arif --- 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