I'm trying to read a bash array file by file but for files with spaces in them, it comes out as two separate files. How would I solve this? file names:
file A
fileB
file_C
the output Im getting is like this
File
A
FileB
File_C
What Im trying to do is to get File A on one line I know I can read the array at once but for now we need to do it with a for loop since we're gonna be doing operations to it later in the loop.
for i in "${array[@]}"; do
echo "$i"
done