请各位老大指教一下
时间:10-02
整理:3721RD
点击:
set IFILE=/genesis/tmp/ifile$$
alias DO_INFO 'COM info,out_file=$IFILE,write_mode=replace,units=mm,args= \!:* ; source $IFILE; rm $IFILE'
DO_INFO -t matrix -e $JOB/matrix
set Name = ""
set Type = ""
set Side = ""
set Inn = ""
set Name = ($Name $gROWname)
set Type = ($Type $gROWlayer_type)
set Side = ($Side $gROWside)
@ i = 1
while ( $i <= $#Name )
if ( $Name[$i] == top ) then ###### 此处可以用 echo expr index "$Name[$i]" top 但不知道格式啊,只要名种含“top”就改名
COM matrix_rename_layer,job=$JOB,matrix=matrix,layer=$Name[$i],new_name=$JOB-a.top
endif
@ i ++
end
exit
alias DO_INFO 'COM info,out_file=$IFILE,write_mode=replace,units=mm,args= \!:* ; source $IFILE; rm $IFILE'
DO_INFO -t matrix -e $JOB/matrix
set Name = ""
set Type = ""
set Side = ""
set Inn = ""
set Name = ($Name $gROWname)
set Type = ($Type $gROWlayer_type)
set Side = ($Side $gROWside)
@ i = 1
while ( $i <= $#Name )
if ( $Name[$i] == top ) then ###### 此处可以用 echo expr index "$Name[$i]" top 但不知道格式啊,只要名种含“top”就改名
COM matrix_rename_layer,job=$JOB,matrix=matrix,layer=$Name[$i],new_name=$JOB-a.top
endif
@ i ++
end
exit
自己会写脚本啊,呵呵,有钱途·
小编见笑,在下不是写,是在学改,这不连格式都还没学会啊。
回复 4# basestar
多谢老大,
我的想法是只要 $name($I) 中包含“TOP” 则改为$JOB.TOP,
包含“BOT” 则改为$JOB.BOT;也就是需要判断“TOP”是否$NAME($I)的子字符窜。
感谢 basestar
按你的方法解决问题。