Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

awk environment variable

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  																					
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #awk #environment #variable
ADD COMMENT
Topic
Name
3+1 =