From: Eric Sunshine Date: Fri, 08 May 2015 03:39:56 GMT Subject: Re: [PATCH 2/3] generate-cmdlist.sh: parse common group commands Message-ID: In-Reply-To: <20150508032011.GA10209@flurp.local> On Thu, May 7, 2015 at 11:20 PM, Eric Sunshine wrote: > From: Eric Sunshine > Subject: [PATCH] generate-cmdlist: parse common group commands > > Signed-off-by: Eric Sunshine > --- > diff --git a/generate-cmdlist.awk b/generate-cmdlist.awk > new file mode 100644 > index 0000000..19b36e5 > --- /dev/null > +++ b/generate-cmdlist.awk > @@ -0,0 +1,39 @@ > [...] > +state == 1 { > + grp[$1] = ++n > + sub($1"[ ][ ]*", "") > + printf "\tN_(\"%s\"),\n", $0 > + next By the way, this 'next' line can be deleted. It was leftover gunk from an earlier iteration. It doesn't harm, but doesn't help either, and is thus potentially confusing. > +} > +/\[common\]/ { > + state = 1 > +} > +END { print "};" }