From owner-svn-src-all@freebsd.org Tue Dec 13 22:20:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC17FC769AC; Tue, 13 Dec 2016 22:20:33 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C94DCFC; Tue, 13 Dec 2016 22:20:33 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=59017 helo=[10.0.0.102]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1cGuSw-000Cfb-96; Tue, 13 Dec 2016 21:18:26 +0000 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r309918 - head/usr.sbin/bsdinstall/scripts From: Devin Teske In-Reply-To: <20161213212435.GA34587@stack.nl> Date: Tue, 13 Dec 2016 14:20:31 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Devin Teske Message-Id: <751FBC9A-2072-4CB0-8318-7F551BD8EB28@freebsd.org> References: <201612121848.uBCIm00M073404@repo.freebsd.org> <20161213212435.GA34587@stack.nl> To: Jilles Tjoelker X-Mailer: Apple Mail (2.2104) Sender: devin@shxd.cx Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 13 Dec 2016 22:20:33 -0000 > On Dec 13, 2016, at 1:24 PM, Jilles Tjoelker wrote: >=20 > On Mon, Dec 12, 2016 at 06:48:00PM +0000, Devin Teske wrote: >> Author: dteske >> Date: Mon Dec 12 18:48:00 2016 >> New Revision: 309918 >> URL: https://svnweb.freebsd.org/changeset/base/309918 = >=20 >> Log: >> Remove unnecessary `-n' parameter to head/tail >=20 > These -n options are not completely unnecessary since POSIX removed = the > obsolete forms without -n years ago, and some minimalistic > implementations (Busybox) followed suit. Therefore, although I use the > obsolete forms frequently interactively, I think head/tail -n should = be > the preferred form in scripts. >=20 > The obsolete form tail +N (where N is a number) should definitely be > avoided since it conflicts with a file named like that; head -N and = tail > -N are valid extensions to the standard. >=20 Thanks for keeping me abreast of the POSIX changes. I'll make the applicable change right now and should I see any other = instances, tackle those in the future as well. --=20 Cheers, Devin >> Modified: >> head/usr.sbin/bsdinstall/scripts/wlanconfig >>=20 >> Modified: head/usr.sbin/bsdinstall/scripts/wlanconfig >> = =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/bsdinstall/scripts/wlanconfig Mon Dec 12 = 18:45:52 2016 (r309917) >> +++ head/usr.sbin/bsdinstall/scripts/wlanconfig Mon Dec 12 = 18:48:00 2016 (r309918) >> @@ -175,8 +175,8 @@ fi >> # >> if [ "$BSDINSTALL_CONFIGCURRENT" ]; then >> # Get current country/regdomain for selected interface >> - WLAN_IFACE=3D$( wpa_cli ifname | tail -n 1 ) >> - INPUT=3D$( ifconfig $WLAN_IFACE list regdomain | head -n 1 ) >> + WLAN_IFACE=3D$( wpa_cli ifname | tail -1 ) >> + INPUT=3D$( ifconfig $WLAN_IFACE list regdomain | head -1 ) >> DEF_REGDOMAIN=3D$( echo $INPUT | cut -w -f 2 ) >> DEF_COUNTRY=3D$( echo $INPUT | cut -w -f 4 ) >> [ "$DEF_REGDOMAIN" =3D 0 ] && DEF_REGDOMAIN=3D"" >=20 > --=20 > Jilles Tjoelker