split string and create array bash
my_array=($(echo $string | tr "," "\n"))
split string and create array bash
my_array=($(echo $string | tr "," "\n"))
bash split array into chunks
#!/bin/bash
array=(aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm)
g=4
for((i=0; i < ${#array[@]}; i+=g))
do
part=( "${array[@]:i:g}" )
echo "Elements in this group: ${part[*]}"
done
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us