teil14
This commit is contained in:
10
teil14/ifexit.sh
Executable file
10
teil14/ifexit.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#! /usr/bin/bash
|
||||
|
||||
./sub.sh ${1}
|
||||
|
||||
if [ ${?} -eq 0 ]; then
|
||||
echo "sub.sh erfolgreich"
|
||||
else
|
||||
echo "sub.sh fehlgeschlagen"
|
||||
fi
|
||||
|
4
teil14/simpleexit.sh
Executable file
4
teil14/simpleexit.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
# /usr/bin/bash
|
||||
|
||||
echo "Beispiel für exit Code"
|
||||
exit 2
|
10
teil14/sub.sh
Executable file
10
teil14/sub.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
# !/usr/bin/bash
|
||||
|
||||
if [ "${1}" == "fail" ]; then
|
||||
echo " ${0}: failing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user