x=$(find . -name \"*.txt\") echo $x
if I run the above piece of code in Bash shell, what I get is a string containing several file names separated
You can put the filenames returned by find into an array like this:
find
array=() while IFS= read -r -d ''; do array+=("$REPLY") done < <(find . -name '*.txt' -print0)
Now you can just loop through the array to access individual items and do whatever you want with them.
Note: It's white space safe.