XML/Input: Difference between revisions
Content added Content deleted
m (Whoops, should be consistent) |
(→AWK: too-narrow solution removed) |
||
Line 48: | Line 48: | ||
==[[AWK]]== |
|||
{{incorrect|AWK}} |
|||
AWK has no XML support. However, careful analysis of the task shows that it just asks for the strings in double quotes. So, here goes - split on quotes, and keep every other content: |
|||
<lang awk> |
|||
$ awk '{for(i=2;i<=NF;i+=2)print $i}' FS='"' t.xml |
|||
April |
|||
Bob |
|||
Chad |
|||
Dave |
|||
Emily |
|||
</lang> |
|||
=={{header|C}}== |
=={{header|C}}== |