'Bash, create multiple arrays with different names using loops
I'm currently learning script shell programming(bash), and trying to make multiple arrays with different names by looping so that I could put the data according to the length of my data files. I've done getting the length of the data file(marked as 'num'), and here's what I could think in my brain.
for (( i=0; i<num; i++ ))
do
let array$i=()
done
I've looked up many method but it didn't work. I'm a newbie to bash so any comments / recommendations / teachings would be so appreciated. Thank you.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
