Date: Mon, 10 Mar 2025 09:07:44 -0700 From: Brian Buhrow <buh...@nfbcal.org> Message-ID: <202503101607.52ag7i3x023...@nfbcal.org>
| #!/bin/sh | # Test retrieving command arguments by using numeric values. | | arg1=$1 | arg2=$2 | arg3=$3 | arg4=$4 | arg5=$5 | arg6=$6 | arg6=$6 | arg7=$7 | arg8=$8 | arg9=$9 | arg10=$10 | arg10=$10 | arg11=$11 This is a simple one, $10 is $1 followed by a '0' - old NetBSD shells used to get it wrong, and treat that as the 10th arg, that was simply a bug that was fixed somewhere in the netbsd7 or netbsd8 timeframe. To reference positional args > $9 you need to use braces ${10} etc. That is, without the braces, only a single digit is treated as the parameter identifier. That's always been the rule. There were lots of bugs in our shell that long ago (and earlier, of course). kre