Ampel über bash Rohversion
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
|||||||
|
#! /usr/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
function ampel() {
|
||||||
|
case ${1} in
|
||||||
|
1)
|
||||||
|
echo "Ampelphase rot"
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
echo "Ampelphase rot/gelb"
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
echo "Ampelphase grün"
|
||||||
|
;;
|
||||||
|
4)
|
||||||
|
echo "Ampelphase gelb"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
for i in 1 2 3 4; do
|
||||||
|
ampel "${i}"
|
||||||
|
done
|
||||||
|
|
||||||
Reference in New Issue
Block a user