I am reading the file data into a bash array and should print its contents on the same line with spaces.
#!/bin/bash filename=$1 declare -a myArray readarray myArray < $1 echo "${myArray[@]}"
I try to do this and even with the echo -n flag, which it still prints on new lines, what am I missing, will printf work better?
source share