|
Last change
on this file was
10447,
checked in by aboeckma, 12 years ago
|
|
Added mrBayes gde menu
|
-
Property svn:executable set to
*
|
|
File size:
515 bytes
|
| Line | |
|---|
| 1 | #!/usr/bin/awk -f |
|---|
| 2 | BEGIN { |
|---|
| 3 | in_trees = in_translate = 0; |
|---|
| 4 | } |
|---|
| 5 | /begin trees;/ { |
|---|
| 6 | in_trees = 1; |
|---|
| 7 | } |
|---|
| 8 | in_translate && /;/ { |
|---|
| 9 | in_translate = 0 |
|---|
| 10 | } |
|---|
| 11 | in_translate { |
|---|
| 12 | sub(/,$/,"") |
|---|
| 13 | map[$1]=$2 |
|---|
| 14 | } |
|---|
| 15 | in_trees && /translate/ { |
|---|
| 16 | in_translate = 1; |
|---|
| 17 | } |
|---|
| 18 | in_trees && /\[/ { |
|---|
| 19 | in_comment = 1; |
|---|
| 20 | } |
|---|
| 21 | in_comment |
|---|
| 22 | in_comment && /\]$/ { |
|---|
| 23 | in_comment = 0; |
|---|
| 24 | } |
|---|
| 25 | in_trees && /tree [^ ]* =/ { |
|---|
| 26 | for (i in map) { |
|---|
| 27 | a=0; |
|---|
| 28 | a+=gsub("[(]"i":","("map[i]":", $4) |
|---|
| 29 | a+=sub(","i":",","map[i]":", $4) |
|---|
| 30 | if (a!=1) print i " " map[i] |
|---|
| 31 | } |
|---|
| 32 | print $4 |
|---|
| 33 | |
|---|
| 34 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.