I need help with bash script. So I have input data as
CellIden="461"
CellIden="465"
CellIden="468"
CellIden="462"
CellIden="466"
CellIden="469"
CellIden="463"
CellIden="467"
CellIden="460"
and I have created while loop
cat FolderCell2 | while read line ;
do
echo $line | sed -e 's/cellIden/Cell/g'
done > FolderCell3
so this will read each line and replace strings, but I need two more loops in this while script :
for (( i = 1; i <=$SEC_NUM ; i++ ))
do
for (( j = 1 ; j <=$Cell_Num ; j++ ))
do
sed -e 's/Cell/Cell$i$j/g'
done
done > File
the ouput shold be like this
Cell11="461"
Cell12="465"
Cell13="468"
Cell21="462"
Cell22="466"
Cell23="469"
Cell31="463"
Cell32="467"
Cell33="460"
Variables $SEC_NUM and $Cell_Num are sometimes different. So I don't know how to combine this two codes, while loop together with two for loop to get ouput as this above.
"