Subject: ksh - Problem with function ${*:-"default"}
To: NetBSD Current <current-users@netbsd.org>
From: Conrad T. Pino <Conrad@Pino.com>
List: current-users
Date: 02/03/2004 04:53:40
Test script:
====== cut here ======
#!/bin/ksh
#
function do_args {
        typeset -r args=${*:-"root"}
        echo $*
        echo $args
        return 0
}
#
uname -sr
do_args fido fifi
do_args
====== cut here ======

Solaris output follows:
$ testargs.sh
SunOS 5.8
fido fifi
fido fifi

root
$

NetBSD output follows:
$ testargs.sh
NetBSD 1.6ZG
fido fifi
fido

root
$

I've figured out a work around with:

	if [[ "$*" -eq "" ]]
	then
		typeset -r args="root"
	else
		typeset -r args="$*"
	fi

Should I sent a problem report somewhere?

TIA,

Conrad