Subject: Re: [PATCH net-next 1/3] selftests: mptcp: fix a mp_fail test warning

From: Jakub Kicinski <[email-masked]>
Date: Mon, 16 May 2022 13:13:46 -0700

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?