Variable de entorno AWK
awk -v env_var="${dimer[j]}" '{ for(f=2; f<=NF; f++) { if ($f < 0) $f=($f+360); } print env_var, $2 $3, $4, $5, $6, $7, $8, $9 $10 }' all_tor_${dimer[j]}.dat > py_${dimer[j]}.dat
#array #do something with awk #print array(env varible) #change name with env varibel
Hutch Polecat