Browse Source

teil11 und teil13

master 1.1
Olli Graf 4 months ago
parent
commit
f979f9952d
  1. 10
      teil11/ifeq.sh
  2. 5
      teil13/allparams.sh
  3. 10
      teil13/paramloop.sh
  4. 14
      teil13/testparams.sh

10
teil11/ifeq.sh

@ -0,0 +1,10 @@
# ifeq.sh
a=10
if [ ${a} = 10 ]; then
echo "a ist 10"
else
echo "a ist ungleich 10"
fi

5
teil13/allparams.sh

@ -0,0 +1,5 @@
#! /usr/bin/bash
#allparams.sh
echo "${@}"

10
teil13/paramloop.sh

@ -0,0 +1,10 @@
#! /usr/bin/bash
#paramloop.sh
let count=0
for p in "${@}"; do
echo "Param ${count}: ${p}"
let count=count+1
done

14
teil13/testparams.sh

@ -0,0 +1,14 @@
#! /usr/bin/bash
# testparam.sh
echo " Param #0: ${0}"
echo " Param #1: ${1}"
echo " Param #2: ${2}"
echo " Param #3: ${3}"
echo " Param #4: ${4}"
echo " Param #5: ${5}"
echo " Param #6: ${6}"
echo " Param #7: ${7}"
echo " Param #8: ${8}"
echo " Param #9: ${9}"
echo " Param #10: ${10}"
Loading…
Cancel
Save