You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
263 B
16 lines
263 B
#! /usr/bin/bash
|
|
|
|
# Array of numbers
|
|
fib=(0 1 2 3 5 8)
|
|
|
|
#Array of Strings
|
|
family=("Marge","Homer","Bart","Lisa","Maggie")
|
|
|
|
# outputs only element 0
|
|
echo "fib=${fib}"
|
|
# output the whole array
|
|
echo "fib=${fib[@]}"
|
|
|
|
#output element by index
|
|
echo "fib[4]=${fib[4]}"
|
|
|
|
|