Schript zu Teil 20.

This commit is contained in:
2025-01-28 09:54:00 +01:00
parent 2be3db4187
commit 4e375b5d08
6 changed files with 39 additions and 0 deletions

7
teil20/hello-shebang.py Executable file
View File

@@ -0,0 +1,7 @@
#! ./mybang
def main():
print("Hallo aus teil20!")
if __name__ == "__main__":
main()

4
teil20/hello.js Executable file
View File

@@ -0,0 +1,4 @@
#! /usr/bin/node
// Datei: hello.js
console.log('Hallo von JavaScript')

9
teil20/hello.py Executable file
View File

@@ -0,0 +1,9 @@
#! ./mybang
# Datei: hello.py
def main():
print("Hallo von Python")
if __name__ == "__main__":
main()

14
teil20/mybang Executable file
View File

@@ -0,0 +1,14 @@
#! /usr/bin/bash
# Datei: mybang
echo "0:${0}"
echo "1:${1}"
echo "2:${2}"
if [[ "${USER}" == "pi" ]]; then
echo "User pi darf python ausführen."
python ${1}
else
echo "Du darfst kein Python ausführen."
fi