This commit is contained in:
2021-06-22 10:11:20 +02:00
parent 5ffcd9f2d2
commit 0ba83cd768
2 changed files with 15 additions and 0 deletions

7
myfunctions.sh Normal file
View File

@@ -0,0 +1,7 @@
function myerror {
code=$1
shift
msg="$*"
echo $msg
exit $code
}

8
test.sh Normal file
View File

@@ -0,0 +1,8 @@
#! /bin/bash
set -e
set -u
source myfunctions.sh
myerror 42 hello world