I have a for loop and case statements. The for loop has quite a bit element list and the case statement will assign an 1D array or a vector. These values will be used in for loop after. I have the following code.
What happens is that the for loop does the job only for the first value in the vector. For example, if the f=C, the case is "C") isotope=(6012 6013);;
for n in $isotope: It loops only for 6012 not for 6013. Same issue with f=Ce, it only does the loop for 58136 not for the rest.
# loop through elements
for f in C Ce
do
cd ${f}
case $f in
"Al") isotope=(13027) ;;
"C") isotope=(6012 6013);;
"Ce") isotope=(58136 58138 58140 58142);;
esac
for n in $isotope
do
....# loop through elements
for f in C Ce
do
cd ${f}
case $f in
"Al") isotope=(13027) ;;
"C") isotope=(6012 6013);;
"Ce") isotope=(58136 58138 58140 58142);;
esac
for n in $isotope
do
....
Thank you for the help
Birsen