#!/bin/bash
IFS='\n'
declare -i count=0
AX=$(find *.iso -maxdepth 1 -type f) # Rather use AX="$(find *.iso -maxdepth 1 -type f"?
# A="${AX%x}" < Could I use this when applying "" to $() in AX? But it should already include newlines like this way. edit: I don't need the trailing newlines fix.
for iso in "$AX"
do
echo "Use "$iso"? [Y/N]?" # Outputs ALL files, IFS has no force somehow
read choiceoffile
shopt -s nocasematch
case $choiceoffile in
y ) echo "Using selected file.";;
* ) continue;;
esac
# some sort of processing
done
Is the command substitution done right? The variable does not work with the IFS \n in the for loop, I don't get why this occurs.
for loop is supposed to process filenames with blank space by processing the output of find line by line (thats why I use the IFS \n).