summaryrefslogtreecommitdiff
path: root/examples/sel-if
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sel-if')
-rw-r--r--examples/sel-if4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/sel-if b/examples/sel-if
new file mode 100644
index 0000000..c6acd1d
--- /dev/null
+++ b/examples/sel-if
@@ -0,0 +1,4 @@
+#!/bin/sh
+echo '<x/>' | ./xmlstarlet sel -T -t -i 'true()' -o yes -n --else -o no -n -b -o all -n
+echo '<x/>' | ./xmlstarlet sel -T -t -i 'false()' -o yes -n --else -o no -n -b -o all -n
+echo '<x/>' | ./xmlstarlet sel -T -t -i 'false()' -o yes -n --elif 'true()' -o maybe -n --else -o no -n -b -o all -n