[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220516131346.1f1f95d9@kernel.org>
Date: Mon, 16 May 2022 13:13:46 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Mat Martineau <mathew.j.martineau@...ux.intel.com>
Cc: netdev@...r.kernel.org, Geliang Tang <geliang.tang@...e.com>,
davem@...emloft.net, pabeni@...hat.com, edumazet@...gle.com,
matthieu.baerts@...sares.net, mptcp@...ts.linux.dev
Subject: Re: [PATCH net-next 1/3] selftests: mptcp: fix a mp_fail test
warning
On Fri, 13 May 2022 17:21:13 -0700 Mat Martineau wrote:
> tc -n $ns2 -j -s action show action pedit index 100 | \
> + grep "packets" | \
> sed 's/.*"packets":\([0-9]\+\),.*/\1/'
sed can do the grepping for you:
sed -n 's/.*"packets":\([0-9]\+\),.*/\1/p'
But really grepping JSON output seems weird. Why not use jq?
Powered by blists - more mailing lists