Olli Graf
5 months ago
3 changed files with 38 additions and 0 deletions
@ -0,0 +1,27 @@ |
|||
# calc.sh |
|||
|
|||
a=5 |
|||
b=10 |
|||
|
|||
# Summenbildung falsch |
|||
|
|||
summe=a+b |
|||
|
|||
echo "Summe falsch: ${summe}" |
|||
|
|||
# Summenbildung korrekt |
|||
let c=a+b |
|||
|
|||
echo "Summe: ${c}" |
|||
|
|||
let d=b-a |
|||
|
|||
echo "Differenz: ${d}" |
|||
|
|||
e=$(expr ${a} \* ${b}) |
|||
|
|||
echo "Multiplikation: ${e}" |
|||
|
|||
let f=b/a |
|||
|
|||
echo "Division: ${f}" |
@ -0,0 +1,6 @@ |
|||
# constant.sh |
|||
|
|||
readonly const=1 |
|||
|
|||
const=2 |
|||
|
@ -0,0 +1,5 @@ |
|||
var='var' |
|||
VAR='VAR' |
|||
|
|||
echo ${VAR} |
|||
echo ${var} |
Loading…
Reference in new issue