I am trying to update an array in a linux tcsh script. The script uses a while loop, and I want to add elements to the array every time the loop iterates. Is there a better way to do this?#!/bin/tcshclearset x = 1while ($x <= 10)echo Enter a number...set number = $<set numbers = ('0', '0', '0', '0', '0', '0', '0', '0', '0', '0')set numbers[$x] = $numberecho The number you entered was $number.if ($number < 0) then        exit 1else if (0 <= $number && $number < 100) then        echo The number is out of range. Please enter another number.endifecho $numbers[1-]#echo $number[10]@ x++end@ y = $number[1]echo $y
Add entries to an array inside a loop
shell script;tcsh