Files
it_school/Bash_scripting/while.sh
Ionel Andrei Cataon 88c2c52751 update
2025-12-11 19:48:49 +02:00

20 lines
318 B
Bash
Executable File

#!/bin/bash
x=1
while (( $x < "10" ))
do
echo "Valoarea lui x este: $x"
x=$(( x+1 ))
done
ar=(11 15 86 23 45 78)
Lenght=${#ar[@]}
echo "Lungimea array-ului este: $lenght"
ar=(32 10 132 32 5 7 43 104)
i=0
lenght=${#ar[@]}
while [ $i -lt $lenght ];
do
echo "Elementul $i din array este: ${ar[$i]}"
i=$(( i+1))
done