[2006-05-04 12:58] James Tuttle said:
| I'm need to grab a few hundred songs out of a few thousand to dump to my
| wife's IPod.  I have a list of the files she selected and I wrote a
| little bash script to grab them and sync them to her IPod, but it fails
| on spaces in filenames.  Probably on things like ' and & and - also.
| Any ideas?


FILES="Barry White - Let's Get It On.mp3
Barry White - Shaft Theme.mp3"

# This could just as easily be the output of ls...
#   ls somedir | while read file;
echo "$FILES" | while read file;
do
  if [ -e "$file" ]; then
    echo "\"$file\" exists"
  else
    echo "\"$file\" doesn't exist"
  fi
done


hth.
  b
-- 
TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ  : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/

Reply via email to