summaryrefslogtreecommitdiffstats
path: root/Examples/test_script_mode.sh
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test_script_mode.sh')
-rwxr-xr-xExamples/test_script_mode.sh35
1 files changed, 23 insertions, 12 deletions
diff --git a/Examples/test_script_mode.sh b/Examples/test_script_mode.sh
index 61e29141..a58ef83e 100755
--- a/Examples/test_script_mode.sh
+++ b/Examples/test_script_mode.sh
@@ -1,17 +1,28 @@
#!/usr/bin/env bash
-echo -en "\x00prompt\x1ftesting\n"
-echo -en "\0urgent\x1f0,2\n"
-echo -en "\0active\x1f1\n"
-echo -en "\0markup-rows\x1ftrue\n"
-echo -en "\0message\x1fSpecial <b>bold</b>message\n"
+if [ x"$@" = x"quit" ]
+then
+ exit 0
+fi
-echo "aap"
-echo "noot"
-echo "mies"
-echo "testing"
-echo "<b>Bold</b>"
-if [ -n "$@" ]
+if [ "$@" ]
then
- echo "$@"
+ for a in {1..10}
+ do
+ echo "$a"
+ done
+ echo "quit"
+else
+ echo -en "\x00prompt\x1ftesting\n"
+ echo -en "\0urgent\x1f0,2\n"
+ echo -en "\0active\x1f1\n"
+ echo -en "\0markup-rows\x1ftrue\n"
+ echo -en "\0message\x1fSpecial <b>bold</b>message\n"
+
+ echo "aap"
+ echo "noot"
+ echo "mies"
+ echo "testing"
+ echo "<b>Bold</b>"
+ echo "quit"
fi