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 AE7B5A058A for ; Fri, 17 Apr 2020 14:50:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 823D51DBA9; Fri, 17 Apr 2020 14:50:35 +0200 (CEST) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id 8AB771DBA9 for ; Fri, 17 Apr 2020 14:50:34 +0200 (CEST) Received: by mail-io1-f67.google.com with SMTP id w20so2174732iob.2 for ; Fri, 17 Apr 2020 05:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emumba-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KE/UuKkl5YqFAAHfHIQV5efCfA9GpJiIAm8T1FdLDIs=; b=eIjrXLRnyqvf1H883opGC/a51cSaRcScugy/M7/0ASmP76RaL0QqBmH/+IwImM2HlH MXMNtU4F+DX2GnoJdPITWAXN25HfFnyyw9JVwt6R8575l4WKscN7k8WNXB1z1WpySUYC R9bRGuAvtqhIbJxesUN2ucTEIhyvZ4uf9FzS46HFSo+H/AVqpJud4B1mYAH7NFHm7Xiv pHng6qjcK5OUGPrRpmoJr+rnVuZ6+jLjAf828L9EgoDgeZYo/mgShKnopJhYv9JRx2u3 1RKwWSz5dBIMczTZScHDPfou4EDpudyfJgMDyGzZKcOJnF5u1zMrAzwwI1zSpdd6V4wB LrEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KE/UuKkl5YqFAAHfHIQV5efCfA9GpJiIAm8T1FdLDIs=; b=l6xeYwMakq3dei9680Ey26hVoMQYxDRgx+N+07SIpTzSKizC6DhMkpFUdpwJzlU95V yi7vCgcllO/NyiimstXNNQXdPAIcLHaFAcFp1vpI54tou/BaV6GA9ANW5Yhpr8sb8aHC mktk0kXRn0N0uyjAw8CnCGTAfJm797lFo1ZiUpNCetInWL5RE7f68C9Lts/jqynzhkFh giHqTIsTVUfuKXCPdyiqhOQig4v1BFlthNY3x9eOwweALOSZAlMaiqXjVOTKOde/lCi0 z6ONcjylxTu/mriejWCxz/hVnavhDT+nvTW4H3RBzYd2RcmoUh1p6iuENKYjRuOZHjr2 /HAg== X-Gm-Message-State: AGi0PuZRoCDBF2KQ+hUyTcPbuwublRj/wwJ/Be2BN4DLA4CqVCSMgZl4 /faeT+xd6OrvUphDPaQbdmyL27kYOYMgiYqvTEQ20g== X-Google-Smtp-Source: APiQypIaMouCnXH8dbFOkS2bYWXo1mysXrXrDA6r11QDL9eMruen9S04tLx9NsAID5R2zV79V13rX2Wskp9VWJWW6Hg= X-Received: by 2002:a02:2a4a:: with SMTP id w71mr3121820jaw.75.1587127833851; Fri, 17 Apr 2020 05:50:33 -0700 (PDT) MIME-Version: 1.0 References: <20200320065002.5410-1-sarosh.arif@emumba.com> In-Reply-To: <20200320065002.5410-1-sarosh.arif@emumba.com> From: Sarosh Arif Date: Fri, 17 Apr 2020 17:50:22 +0500 Message-ID: To: dev@dpdk.org Cc: stable@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-stable] [PATCH v2] 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" Hello, If there is no objection on this patch then it can perhaps be applied. On Fri, Mar 20, 2020 at 11:50 AM Sarosh Arif wrote: > Bugzilla ID: 419 > Cc: stable@dpdk.org > Signed-off-by: Sarosh Arif > --- > usertools/dpdk-setup.sh | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/usertools/dpdk-setup.sh b/usertools/dpdk-setup.sh > index e5bbe9fee..c27f89c5f 100755 > --- a/usertools/dpdk-setup.sh > +++ b/usertools/dpdk-setup.sh > @@ -592,11 +592,17 @@ while [ "$QUIT" == "0" ]; do > echo "[$OPTION_NUM] Exit Script" > OPTIONS[$OPTION_NUM]="quit" > echo "" > - echo -n "Option: " > - read our_entry > + read -p "Option: " our_entry > + [ $? -eq 0 ] || exit 0 > + > echo "" > - ${OPTIONS[our_entry]} ${our_entry} > - > + numeric="^[[:digit:]]+$" > + if [[ "$our_entry" =~ $numeric ]]; then > + ${OPTIONS[our_entry]} ${our_entry} > + else > + echo "Please enter a numeric value" > + fi > + > if [ "$QUIT" == "0" ] ; then > echo > echo -n "Press enter to continue ..."; read > -- > 2.17.1 > >