summaryrefslogtreecommitdiffstats
path: root/indenters/examples/example.sh
blob: c2ac3f1cf78a2bccfaec21ca99611dd939131866 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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"