summaryrefslogtreecommitdiffstats
path: root/indenters/examples/example.sh
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-09-18 14:21:27 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-09-18 14:21:27 +0900
commit8d6255b84d9fb6a585d010119f289baff0794df9 (patch)
tree5e2a9bb3ea6f85217a9e01cee5634dca5170ca50 /indenters/examples/example.sh
parent3db895919a4cd36972dd5241f480a68fe0f4eb4d (diff)
downloaduniversal-indent-gui-tqt-8d6255b84d9fb6a585d010119f289baff0794df9.tar.gz
universal-indent-gui-tqt-8d6255b84d9fb6a585d010119f289baff0794df9.zip
Added indenter examples
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'indenters/examples/example.sh')
-rwxr-xr-xindenters/examples/example.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/indenters/examples/example.sh b/indenters/examples/example.sh
new file mode 100755
index 0000000..c2ac3f1
--- /dev/null
+++ b/indenters/examples/example.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+string="Hallo Welt"
+# if else test
+if [ -n "$string" ]; then
+echo "The string is \"$string\"!"
+else
+echo "The string is empty!"
+fi
+
+# for test
+array="Text1 Text2 Text3 Text4"
+for i in $array
+do
+echo "The string \"$i\" is in the array!"
+done
+
+count=0
+while [ $count -le 10 ]
+do
+echo "We've counted up to $count."
+count=$[$count+1] #increment counter by one.
+done
+
+echo "Passed everything!"
+#read -p "press any key to continue"
+