I have just started reading about $@ and $*, I wanted to know if I can specifically point to an element in the $@ array. Like without using any loop, I want to be able to pick element number 3 from $@. Is there a way of doing this like $1+@ or something like this? I already know about ${1} but want to know specifically about $@ and $*. I tried searching for it but did not find anything related to this.I have a feeling, this is a stupid question.
Picking specific array element
array
It is said that the positional parameters are not an array.And the way that exists to set them is via set. No other array needs that.$ set -- one two t33 f44$ printf '%s\n' $@onetwot33f44But at least in bash (and ksh and zsh), they could be selected just as easy:$ set -- one two t33 f44$ echo ${@:2:1}two$ echo ${@:2:2}two t33