Feb 15, 2004 #1 Larshg Programmer Mar 1, 2001 187 DK Hi I have an array set -A zerros 0 0 0 0 What is the command to update the 2. carater in the array - to ex 1 So that my array would look something like this before 0 0 0 0 command xxxx${zerros[$2]}=1 after 0 1 0 0 Thanks Larshg
Hi I have an array set -A zerros 0 0 0 0 What is the command to update the 2. carater in the array - to ex 1 So that my array would look something like this before 0 0 0 0 command xxxx${zerros[$2]}=1 after 0 1 0 0 Thanks Larshg
Feb 15, 2004 #2 aigles Technical User Sep 20, 2001 464 FR zerros[1]=1 indice starts at 0 /home/jp> set -A array 0 1 2 3 /home/jp> echo ${array[*]} 0 1 2 3 /home/jp> echo ${array[2]} 2 /home/jp> array[2]=222 /home/jp> echo ${array[*]} 0 1 222 3 /home/jp> Jean Pierre. Upvote 0 Downvote
zerros[1]=1 indice starts at 0 /home/jp> set -A array 0 1 2 3 /home/jp> echo ${array[*]} 0 1 2 3 /home/jp> echo ${array[2]} 2 /home/jp> array[2]=222 /home/jp> echo ${array[*]} 0 1 222 3 /home/jp> Jean Pierre.