[comp.sources.bugs] uuhosts 1.69 bug, with fix

john@basser.oz (John Mackin) (10/14/87)

Under some circumstances, "uuhosts string" can print the
map information for each host more than one time each.
This happens if more than one host in the same file in the map data
matches the string.

With the current maps, try "uuhosts ear".  You will get earache,
earvax, earth and earwax; earache and earvax will each be printed
twice.

Fix: run this article through "patch -d uuhosts-source-directory".
If you don't have patch, apply the following diff by hand.

John Mackin, Basser Department of Computer Science,
	     University of Sydney, Sydney, Australia

john@basser.oz.AU (john%basser.oz.AU@UUNET.UU.NET)
{uunet,hplabs,mcvax,ukc,nttlab}!munnari!basser.oz!john

*** uuhosts.sh	Sat Oct 10 23:40:09 1987
--- uuhosts.sh_NEW	Sat Oct 10 23:41:27 1987
***************
*** 268,274
  			case $look in
  			*look*)
  				files=`$look $lookopt$arg Index |
! 				sed -n -e "/^$arg/s%.*	%%p"`
  				;;
  			*)
  				files=`

--- 268,275 -----
  			case $look in
  			*look*)
  				files=`$look $lookopt$arg Index |
! 				sed -n -e "/^$arg/s%.*	%%p" |
! 				sort -u`
  				;;
  			*)
  				files=`
***************
*** 272,278
  				;;
  			*)
  				files=`
! 				sed -n -e "/^$arg/s%.*	%%p" Index`
  				;;
  			esac
  			case $files in

--- 273,280 -----
  				;;
  			*)
  				files=`
! 				sed -n -e "/^$arg/s%.*	%%p" Index |
! 				sort -u`
  				;;
  			esac
  			case $files in