我想从文本文件中读取数组HSPACE
,然后分别为数组的每个元素执行以下代码。可以使用shell脚本吗?
awk 'NR==8 {$1=" " a }1' a=$HSPACE spacingcontrol.vls > tmp.vls && mv tmp.vls spacingcontrol.vls
awk 'NR==8 {$2=" " b " "}1' b=$HSPACE spacingcontrol.vls > tmp.vls && mv tmp.vls spacingcontrol.vls
spacingcontrol.vls如下:
thk_bl n BC GEOM CV
0.24 1 axl 1
PITCH xc yc
0.80000000 1.0 1.0
1 INFLOW h_min h_max Node per RadCRv
0.01 0.01 5.
NZONES
1
RADIUS XC YC h
0.00 0.87 0.740 0.002
INFLOW
和h_min
是取值HSPACE