In the shell enviroment of tcsh, I have a variable $zz which is an array:
---echo $zz
la1_22066 la1_22073 la1_22080 la1_22087 la1_22094 la1_22101 la1_22108 la1_22115 la1_22122 la1_22129 la1_22136 la1_22143 la1_22150 la1_22157
--- to get the first element in the array: echo $zz[1]
--- to get the last element in the array: echo $zz[$#zz] (in csh perhaps it works also with echo $zz[$])
--- to get all the elements in the array: echo $zz[*]
Aucun commentaire:
Enregistrer un commentaire