I am trying to merge two arrays into one in a zipper like fashion. I have difficulty to make that happen.
array1=(one three five seven)
array2=(two four six
You can easily read the files, create an array with their content, check who is the bigger one and make the loop.
#!/usr/bin/env bash
## Writting a until d into the file file01 and writing 1 until 3 into the file file02.
echo {a..d} | tee file01
echo {1..3} | tee file02
## Declaring two arrays (FILE01 and FILE02) and a variable as integer.
declare -a FILE01=($(
declare -a
-> It creates an array
declare -i
-> It declares the var as integer
${#FILE01[@]}
-> It's to get the array size