"how to take array input in shell script" Code Answer's

You're definitely familiar with the best coding language Shell/Bash that developers use to develop their projects and they get all their queries like "how to take array input in shell script" answered properly. Developers are finding an appropriate answer about how to take array input in shell script related to the Shell/Bash coding language. By visiting this online portal developers get answers concerning Shell/Bash codes question like how to take array input in shell script. Enter your desired code related query in the search bar and get every piece of information about Shell/Bash code related question on how to take array input in shell script. 

how to take array input in shell script

By Ugly UnicornUgly Unicorn on Dec 03, 2020
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[@]}"

Source: stackoverflow.com

Add Comment

0

All those coders who are working on the Shell/Bash based application and are stuck on how to take array input in shell script can get a collection of related answers to their query. Programmers need to enter their query on how to take array input in shell script related to Shell/Bash code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about how to take array input in shell script for the programmers working on Shell/Bash code while coding their module. Coders are also allowed to rectify already present answers of how to take array input in shell script while working on the Shell/Bash language code. Developers can add up suggestions if they deem fit any other answer relating to "how to take array input in shell script". Visit this developer's friendly online web community, CodeProZone, and get your queries like how to take array input in shell script resolved professionally and stay updated to the latest Shell/Bash updates. 

Shell/Bash answers related to "how to take array input in shell script"

View All Shell/Bash queries

Shell/Bash queries related to "how to take array input in shell script"

how to take array input in shell script how to sort array in shell script how to compare float values in shell script how to store float values in shell script shell script variable shell script:while done fish shell script parent directory multiple dots how to run power shell script telnet in shell script show dialog box shell script how to compare percentage value in shell script bash call another script relative to current script Write a program which takes 2 digits, X,Y as input and generates a 2-dimensional array. The element value in the i-th row and j-th column of the array should be i*j. "crontab" change dynamically shell move word shell unix desktop trigger click bash shell ubuntu linux bash export vars between shell instances magento shell reindex linux shell echo command with varia ble set zsh as default shell shell set environment variable shell function example shell find string in directory linux change user shell /bin/false shell reverse lines how to bypass an alias in fish shell for loop while loop shell functions ubuntu default tmux shell ./build/env/bin/hue shell ts3 install script batch script arguments linux startup script execute powershell script from command line with parameters How can I remove the first line of a text file using bash/sed script? powershell script has no signature Running a local script on a remote machine (or remote on local) powershell script to create dummy users in active directory Exit bash script if not running as root Failed at the [email protected] postinstall script. how to comment a line in batch script the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty' powershell get input from user Input is required, but Expo CLI macbook disable input from built in keyboard PowerShell remove object from array bash array

Browse Other Code Languages

CodeProZone