On Wed, Jan 04, 2012 at 02:38:22PM +0800, jida...@jidanni.org wrote: > Hmmm, as S. CHAZELAS said seems zsh also gives one a chance to reset an > arbitrary positional parameter, e.g., the 42nd, whereas in bash one must > set them all at once:
That is why named arrays are COMPLETELY superior and should be used in almost every circumstance. The only reason one would ever use the positional paramters instead of a named array is because one is writing for sh instead of for bash. > $ set `seq 55` > $ echo $42 > 42 > $ echo $66 > 66 That is not doing what you think it is doing. $ set A B C D E F $ echo $66 F6 If you want to refer to the 66th positional parameter, you must use ${66}.