> On Dec 13, 2016, at 1:24 PM, Jilles Tjoelker <jil...@stack.nl> wrote: > > 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 >> <https://svnweb.freebsd.org/changeset/base/309918> > >> Log: >> Remove unnecessary `-n' parameter to head/tail > > 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. > > 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. >
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. -- Cheers, Devin >> Modified: >> head/usr.sbin/bsdinstall/scripts/wlanconfig >> >> Modified: head/usr.sbin/bsdinstall/scripts/wlanconfig >> ============================================================================== >> --- 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=$( wpa_cli ifname | tail -n 1 ) >> - INPUT=$( ifconfig $WLAN_IFACE list regdomain | head -n 1 ) >> + WLAN_IFACE=$( wpa_cli ifname | tail -1 ) >> + INPUT=$( ifconfig $WLAN_IFACE list regdomain | head -1 ) >> DEF_REGDOMAIN=$( echo $INPUT | cut -w -f 2 ) >> DEF_COUNTRY=$( echo $INPUT | cut -w -f 4 ) >> [ "$DEF_REGDOMAIN" = 0 ] && DEF_REGDOMAIN="<not selected>" > > -- > Jilles Tjoelker _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"