Submitted by: Sandro Sigala <sandro@cat.locao.net> as part of PR# 2134
utilities w/improvements from the NetBSD group.