Arrays are bashisms, lol. Attempting to access a variable as somevar[@] (for-loop form), or somevar[*] (string joining form), represents bash syntax, whereas POSIX sh has not even an array type.
Note that the for keyword is NOT a bashism. The for loop has been in POSIX sh for some time, though it can only be used with an array literal or with $@ (implicit when the "in foo bar baz" part is omitted), not with any kind of array variable.
$@ is not a bashism.
$* is not a bashism.
${@:someinteger} and "${@:someinteger}" ARE bashisms, as bare POSIX sh does not features these shift shorthand convenience forms.
Last edit: mcandre 2017-08-30
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
(I spoke too early in this comment about treating some things like
for
,$@
, and$*
as bashisms.)Last edit: mcandre 2017-08-30
Note that the for keyword is NOT a bashism. The for loop has been in POSIX sh for some time, though it can only be used with an array literal or with
$@
(implicit when the "in foo bar baz" part is omitted), not with any kind of array variable.$@
is not a bashism.$*
is not a bashism.${@:someinteger}
and"${@:someinteger}"
ARE bashisms, as bare POSIX sh does not features these shift shorthand convenience forms.Last edit: mcandre 2017-08-30