Schript zu Teil 20.
This commit is contained in:
2
alias/noalias.sh
Executable file
2
alias/noalias.sh
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
ll
|
3
alias/yesalias.sh
Executable file
3
alias/yesalias.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
shopt -s expand_aliases # Aktiviert Aliase
|
||||||
|
alias ll='ls -la'
|
||||||
|
ll
|
7
teil20/hello-shebang.py
Executable file
7
teil20/hello-shebang.py
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#! ./mybang
|
||||||
|
def main():
|
||||||
|
print("Hallo aus teil20!")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
4
teil20/hello.js
Executable file
4
teil20/hello.js
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#! /usr/bin/node
|
||||||
|
// Datei: hello.js
|
||||||
|
|
||||||
|
console.log('Hallo von JavaScript')
|
9
teil20/hello.py
Executable file
9
teil20/hello.py
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#! ./mybang
|
||||||
|
# Datei: hello.py
|
||||||
|
|
||||||
|
def main():
|
||||||
|
print("Hallo von Python")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
14
teil20/mybang
Executable file
14
teil20/mybang
Executable 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
|
||||||
|
|
Reference in New Issue
Block a user