langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
5
Task/Arrays/UNIX-Shell/arrays-4.sh
Normal file
5
Task/Arrays/UNIX-Shell/arrays-4.sh
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
x=${#alist[*]} # start with the number of items in the array
|
||||
while [[ $x > 0 ]]; do # while there are items left
|
||||
: $((x--)) # decrement first, because indexing is zero-based
|
||||
echo "Item $x = ${alist[$x]}" # show the current item
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue