Skip to content

Commit e75d94c

Browse files
committed
simplify ${#@} to $#
In bash both are identical, in POSIX sh however ${#@} yields the string length of $@. So after set 3 4 5 $@ expands to 5 in (e.g.) dash.
1 parent d6bf040 commit e75d94c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/sys

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function startsWithDash {
55
test "${1:0:1}" = "-"
66
}
77
function paramsAreEmpty {
8-
test ${#@} -eq 0
8+
test $# -eq 0
99
}
1010

1111
function printHelp {

0 commit comments

Comments
 (0)