From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 19:24:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48A05233; Mon, 9 Feb 2015 19:24:45 +0000 (UTC) Received: from mail-wg0-x235.google.com (mail-wg0-x235.google.com [IPv6:2a00:1450:400c:c00::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CAF83122; Mon, 9 Feb 2015 19:24:44 +0000 (UTC) Received: by mail-wg0-f53.google.com with SMTP id x13so8953939wgg.12; Mon, 09 Feb 2015 11:24:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=zdn0MCwk6aImxTrO9Nr3E9swg1Uo4/bU8ov4+9lrVD8=; b=VNkN0FrmBgZ+wURkchEJzp5hdfebLjoqBh6nmI5WElXYH4VFExynMSZLk+5LDkh4qL Z8k4bx5oIa4G7KVcijJGljyNiUZpKv0oRwdABkrCqAVvfXPExbeYx+oQOTzP4+40WRFr /y6GVFE7M3TUTSUHSqWarroMDZT9Jp2h8Qs4/1rpkLk2yWKzv1Kv/+JDQmOBuXWFwwZF wGqMWk3cLTYCyY9RM2B/uKsnFQ0n4r7rnTUrg/MzI2ZUoVi9G799M3oaBOZaZN6sPP78 2VzNOYY3bLM7R5QWx6VtbDFtK5Xs1QjImcUg1AusDpLsf/lPnRmsSiSFIVxn3uijV4xH MXSQ== X-Received: by 10.180.73.241 with SMTP id o17mr31314441wiv.16.1423509883241; Mon, 09 Feb 2015 11:24:43 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id fo17sm17619088wjc.19.2015.02.09.11.24.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Feb 2015 11:24:42 -0800 (PST) Sender: Baptiste Daroussin Date: Mon, 9 Feb 2015 20:24:40 +0100 From: Baptiste Daroussin To: Devin Teske Subject: Re: svn commit: r278467 - head/usr.sbin/bsdconfig/share Message-ID: <20150209192440.GL29891@ivaldir.etoilebsd.net> References: <201502091916.t19JGJcO061055@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="37cJpJlYZwAfNbm5" Content-Disposition: inline In-Reply-To: <201502091916.t19JGJcO061055@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 19:24:45 -0000 --37cJpJlYZwAfNbm5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 09, 2015 at 07:16:19PM +0000, Devin Teske wrote: > Author: dteske > Date: Mon Feb 9 19:16:19 2015 > New Revision: 278467 > URL: https://svnweb.freebsd.org/changeset/base/278467 >=20 > Log: > Replace the only instance of sed(1) in bsdconfig(8) with awk(1). > =20 > MFC after: 3 days >=20 > Modified: > head/usr.sbin/bsdconfig/share/keymap.subr >=20 > Modified: head/usr.sbin/bsdconfig/share/keymap.subr > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/bsdconfig/share/keymap.subr Mon Feb 9 17:53:16 2015 (r= 278466) > +++ head/usr.sbin/bsdconfig/share/keymap.subr Mon Feb 9 19:16:19 2015 (r= 278467) > @@ -219,7 +219,7 @@ f_keymap_get_all() > echo -n "$k " > # NOTE: Translate '8x8' to '8x08' before sending to > # sort(1) so that things work out as we might expect. > - debug=3D keymap_$k get desc | sed -e 's/8x8/8x08/g' > + debug=3D keymap_$k get desc | awk 'gsub(/8x8/,"8x08")||1' > done | sort -k2 | awk '{ > printf "%s%s", (started ? " " : ""), $1; started =3D 1 > }' Out of curiosity what is the point of preferring awk over sed? the awk bina= ry being larger and depending on 2 libraries versus sed only depending on one? Best regards, Bapt --37cJpJlYZwAfNbm5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlTZCXgACgkQ8kTtMUmk6EyOJACgjY6q9gMxurf/We39qh9NaglW SNYAoLJpxSASyEcv6T8QY1cVRJu7jt3y =o4o2 -----END PGP SIGNATURE----- --37cJpJlYZwAfNbm5--