svn commit: r278467 - head/usr.sbin/bsdconfig/share

Devin Teske dteske at FreeBSD.org
Mon Feb 9 19:16:20 UTC 2015


Author: dteske
Date: Mon Feb  9 19:16:19 2015
New Revision: 278467
URL: https://svnweb.freebsd.org/changeset/base/278467

Log:
  Replace the only instance of sed(1) in bsdconfig(8) with awk(1).
  
  MFC after:	3 days

Modified:
  head/usr.sbin/bsdconfig/share/keymap.subr

Modified: head/usr.sbin/bsdconfig/share/keymap.subr
==============================================================================
--- head/usr.sbin/bsdconfig/share/keymap.subr	Mon Feb  9 17:53:16 2015	(r278466)
+++ head/usr.sbin/bsdconfig/share/keymap.subr	Mon Feb  9 19:16:19 2015	(r278467)
@@ -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= keymap_$k get desc | sed -e 's/8x8/8x08/g'
+			debug= keymap_$k get desc | awk 'gsub(/8x8/,"8x08")||1'
 		done | sort -k2 | awk '{
 			printf "%s%s", (started ? " " : ""), $1; started = 1
 		}'


More information about the svn-src-head mailing list