Reputation: 568
I want to make git clone with for loop. So I made a shell as below.
mss=("company","fruit","car")
for ms in "${mss[@]}" ; do
git clone https://github.com/test/$ms
yarn // to install node_module of each repository
done
But when I run this shell, it doesn't work at all.
Upvotes: 1
Views: 982
Reputation: 311843
Shell arrays don't have commas in them - the elements are separated by whitespace:
mss=("company" "fruit" "car")
Upvotes: 2