summaryrefslogtreecommitdiff
path: root/examples/count1
diff options
context:
space:
mode:
Diffstat (limited to 'examples/count1')
-rw-r--r--examples/count13
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/count1 b/examples/count1
new file mode 100644
index 0000000..92f822e
--- /dev/null
+++ b/examples/count1
@@ -0,0 +1,3 @@
+#!/bin/sh
+# Count elements matching XPath expression
+./xmlstarlet sel -T -t -v "count(/xml/table/rec/numField)" xml/table.xml