Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4692327pxb; Tue, 22 Feb 2022 04:21:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJwCKk8x3MXFKeSYhWA6CHVl5kC6Uew5j6oVfFJYloIlhcntHjQdV5rKCxLkn5e+bCvrOBMP X-Received: by 2002:aa7:d74d:0:b0:410:b60a:c37e with SMTP id a13-20020aa7d74d000000b00410b60ac37emr25828744eds.330.1645532460423; Tue, 22 Feb 2022 04:21:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645532460; cv=none; d=google.com; s=arc-20160816; b=rj5y0Vnwi3Xgbf0trP1dWbG38Qa08+C4Zc3CnnQXu5cJBxAS9xWBJz7PLyBk5hU946 5Q2pZsUZMkC2sfM8xj2z6YZTM7snPIUguRINPba1+18w6Iz1c3k2ZxQVy6IpUkbTgiTK yFoIbbIQO9ZxzvxTyeJZDG5XiwZmFnlu6FFFHeQmO+2xrjS+gusI+ONAZ8FkRjZLUUOF oWdbyd5VFiSHrPnNg6ixabK+Wdclk2+arnaEr8q/b5ZpqiIvKrJZwIWnlQA2PN/piwNM dLNH0GqUMkUdrlQ1TTDuanvuKLHPbDr8NdSQvhTbxivJ8fnyzgFm0BTpMsZY/BOR36C5 653A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=oViiIR2VRyYBBhDAK9mC8X+yTxfIk5/a38XgL4IVk8g=; b=gJ7ysl4QF5ov15186vT+5MsQhuqvzJNlo69nC1+tafUQjkhSvldv3FKqW6ViH6AXyI EgEVWpvCE/KqAb4NFN03zS+r1H1J4tQ8r+4JzAVU/q83lTUrkNbcgNvTW5Haew37g6bU woI/xt0miUYCXOP29MSNHsb8HzevFCmr+aCHD9UCUbbG6HafsqJGFV/AgyJ1yVOsGU2W LPOyVH8afBukT5S4mN+jG9q5UK/UqPFaVD8yUWd2mJg9jxCTD3HY2piP2NGGYNIUrX+7 sw0tnIIjJpOmrmUM24na2gh0AlbHIwc4F1KgXmTyBPKloA3E8d7c+f0xNw1Whe7PLaQG V2QQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q6si10326289ejt.197.2022.02.22.04.20.37; Tue, 22 Feb 2022 04:21:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231191AbiBVMII (ORCPT + 99 others); Tue, 22 Feb 2022 07:08:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbiBVMIE (ORCPT ); Tue, 22 Feb 2022 07:08:04 -0500 Received: from mx1.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B165492D32; Tue, 22 Feb 2022 04:07:38 -0800 (PST) Received: from localhost.localdomain (ip5f5aebb8.dynamic.kabel-deutschland.de [95.90.235.184]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 3D66261E6478B; Tue, 22 Feb 2022 13:07:35 +0100 (CET) From: Paul Menzel To: "Paul E. McKenney" , Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Shuah Khan Cc: Paul Menzel , Zhouyi Zhou , rcu@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] torture: Select line in sed and replace grep Date: Tue, 22 Feb 2022 13:07:16 +0100 Message-Id: <20220222120718.17141-1-pmenzel@molgen.mpg.de> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sed’s switch `-n` (`--silent`) suppresses the automatic printing of the pattern space, therefore, allowing to replace grep by only printing the current pattern space using the command `p`. Signed-off-by: Paul Menzel --- tools/testing/selftests/rcutorture/bin/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh index c35ba24f994c..5cff520955e6 100644 --- a/tools/testing/selftests/rcutorture/bin/functions.sh +++ b/tools/testing/selftests/rcutorture/bin/functions.sh @@ -301,7 +301,7 @@ specify_qemu_cpus () { echo $2 -smp $3 ;; qemu-system-ppc64) - nt="`lscpu | grep '^NUMA node0' | sed -e 's/^[^,]*,\([0-9]*\),.*$/\1/'`" + nt="`lscpu | sed -n -e '/^NUMA node0/s/^[^,]*,\([0-9]*\),.*$/\1/p'`" echo $2 -smp cores=`expr \( $3 + $nt - 1 \) / $nt`,threads=$nt ;; esac -- 2.35.1