cshの配列
cshの配列はsetコマンドで宣言します。
配列の基底値は1になります。また、配列の要素数を取得するには$#配列名とします。
以下サンプルです。

#!/bin/csh

set arr = (test1 test2 test3)
set i = $#arr
set j = 1

while ( $j <= $i )
  echo $test[$j]
  @ j++
end

Back to top

Information