Hi.
I�ve a script that should substitude the 8th line in a file called xxx.num6.
The "xxx" is set by an array filled with this command:
j=0
for Par in *.sys ; do
Par=`echo $Par | sed 's/\(.*\).sys/\1/'` ;
Par2[$j]="$Par" ; echo "${Par2[$j]}"
j=$((j + 1));
done
Now i try to implement the substitution with:
j=0
for dummy in *.sys ; do
sed '8d' ${Par2[$j]}.num6 > run1.ksh
sed -e '/ntout/i\tend='$tend_Mges'' run1.ksh > ${Par2[$j]}.num6
j=$((j + 1))
done
So the substitution works, if i set the Name of the file (e.g. abc.num6) instead of the parameter.
But if I type in "echo ${Par2[$j]}.num6" , the output of the variable is the correct Name. (e.g. abc.num6)
So i think the problem hides into the Syntax of the parameter "${Par2[$j]}.num6" ???