root / examples / Test / Dep_tgt.awk @ 12
Historique | Voir | Annoter | Télécharger (592 octet)
1 | 1 | pfleura2 | BEGIN{ |
---|---|---|---|
2 | 1 | pfleura2 | it=-1 |
3 | 1 | pfleura2 | pi=3.14159265358979 |
4 | 1 | pfleura2 | } |
5 | 1 | pfleura2 | { if ($1=="PATHNAME") { i=index($3,","); if (i==0) {Nom=$3} else {Nom=substr($3,1,i-1) }; Nom=Nom "_tgt_";next} |
6 | 1 | pfleura2 | } |
7 | 1 | pfleura2 | |
8 | 1 | pfleura2 | /Visualization of tangents/,/END of tangents/ { |
9 | 1 | pfleura2 | if ($1=="Visualization") { it++; File=Nom it ".dat"; |
10 | 1 | pfleura2 | print "#Tangents for Iopt=" it > File; next;} |
11 | 1 | pfleura2 | if ($1=="END") { next } |
12 | 1 | pfleura2 | if (NF==0) {print "" >> File; next} |
13 | 1 | pfleura2 | printf(" %12.5f %12.5f %12.5f",$1*1.,$2*1.,$3*180./pi) >> File |
14 | 1 | pfleura2 | for(j=4;j<=NF;j+=3) { printf(" %12.5f %12.5f %12.5f",$j*1.,$(j+1)*180./pi,$(j+2)*180./pi) >> File } |
15 | 1 | pfleura2 | print "" >> File |
16 | 1 | pfleura2 | } |
17 | 1 | pfleura2 | END{ |
18 | 1 | pfleura2 | } |