Answers for "how to take array input in shell script"

0

how to take array input in shell script

declare -a array_name
echo "How many groups you want to enter?"
read group_count
echo "enter $group_count groups: "
echo $group_count
for(( c = 0 ; c < $group_count ; c++))
do
  read abc_elements
#  while read abc_elements
#  do
  array_name[$c]="$abc_elements"
#  done
done
echo -e "${array_name[@]}"
Posted by: Guest on December-03-2020

Code answers related to "how to take array input in shell script"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language