svn commit: r309917 - head/usr.sbin/bsdinstall/scripts

Devin Teske dteske at FreeBSD.org
Mon Dec 12 18:45:53 UTC 2016


Author: dteske
Date: Mon Dec 12 18:45:52 2016
New Revision: 309917
URL: https://svnweb.freebsd.org/changeset/base/309917

Log:
  awk(1) match() takes a regex, use /.../ to remind ourselves of this
  NB: The difference between "..." and /.../ for a regex in awk is that
  quoted strings go through escape expansion first (e.g., \\ becomes \)

Modified:
  head/usr.sbin/bsdinstall/scripts/wlanconfig

Modified: head/usr.sbin/bsdinstall/scripts/wlanconfig
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/wlanconfig	Mon Dec 12 18:43:42 2016	(r309916)
+++ head/usr.sbin/bsdinstall/scripts/wlanconfig	Mon Dec 12 18:45:52 2016	(r309917)
@@ -93,8 +93,8 @@ dialog_country_select()
 		sub(/Regulatory.*/, "")
 		for (i = 1; i <= NF; i++) {
 			printf "%s", $i
-			if (match($i, "[[:lower:]]"))
-				if (match($(i+1), "[[:lower:]]"))
+			if (match($i, /[[:lower:]]/))
+				if (match($(i+1), /[[:lower:]]/))
 					printf "\\\\\\ "
 				else
 					printf "\n"


More information about the svn-src-all mailing list