No matter what I do I can't get a file list that includes spaces to save right in a variable.
Here is my script so far
Code:
#!/bin/bash
cd ~/movies
#####two different options that have the commands work on command line but not saved to the variable right. Output of both is the full path to each file from the current $PWD with escape characters
#for i in `ls -1Rb | sed /^$/d | gawk '/:$/{dir=substr($0,1,length($0)-1)} !/:$/{printf "%s/%s\n",dir,$0}' | grep .nfo`
for i in `find . -type f | sed 's/[!@\ "()]/\\&/g' | grep .nfo`
do
##### What I plan on actually doing just commented out till the variable is right
#grep "<id>tt" '$i' | sed s/\ \ \ \ \<id\>tt/http:\\/\\/www.imdb.com\\/title\\/tt/ | sed s/\<\\/id\>// >> '$i'
##### my quick test for if the variable saves the file list right
echo $i
done