#!/bin/bash ########################### # Declare array in bash. -a means array declare -a dr_suse # Assign data to array dr_suse=(one_fish two_fish red_fish blue_fish) # Access one element of the array echo ${dr_suse[2]} # Access all elements of the array echo ${dr_suse[*]} # expands element retaining IFS in single lement echo ${dr_suse[*]} # expands based on IFS # Destroy array unset dr_suse # Destroy array element unset dr_suse[3]