Jump to content

XML/Input: Difference between revisions

309 bytes removed ,  15 years ago
→‎AWK: too-narrow solution removed
m (Whoops, should be consistent)
(→‎AWK: too-narrow solution removed)
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}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.