power.sh für mehrdimensionale Arrays.

This commit is contained in:
2025-09-15 09:37:35 +02:00
parent 4bd2566b04
commit ff7035cd22
7 changed files with 46 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
#! /usr/bin/bash
# File: create.sh
a1=(0 1 2 3 4)
family=("Marge" "Homer" "Bart" "Lisa" "Maggie")
@@ -7,14 +8,3 @@ echo "a1=${a1[@]}"
echo "family=${family[@]}"
echo "Länge family: ${#family[@]}"
# Define an Array with declare -a
declare -a sbc
sbc[0]="Raspberry Pi"
echo "Länge sbc: ${#sbc[@]}"
echo "sbc=${sbc[@]}"
sbc[1]="Orange Pi"
echo "Länge sbc: ${#sbc[@]}"
echo "sbc=${sbc[@]}"
sbc[2]="Banana Pi"
echo "Länge sbc: ${#sbc[@]}"
echo "sbc=${sbc[@]}"