Hi I am trying to create a script that will count the number of characters between xml tags and idealy group by these values before returning the variations:
eg
<CONTEXT_1>aaaa<CONTEXT_1>
<CONTEXT_2>bb<CONTEXT_2>
<CONTEXT_2>dfgh<CONTEXT_2>
<CONTEXT_6>bb<CONTEXT_6>
<CONTEXT_1>bbbb<CONTEXT_1>
the result of this would be
<CONTEXT_1> 4
<CONTEXT_2> 2,4
<CONTEXT_6> 4
Any help would be much appreciated! I’m totally stuck
Thanks
M
You can do something like this using sed:
which prints: