📜  awk 环境变量 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:31.055000             🧑  作者: Mango

代码示例1
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