Im trying to create a list of file-paths from a file but I don't seem to be able to get around the spaces in the file paths.
# Show current series list
PS3="Type a number or 'q' to quit: "
# Create a list of files to display
Current_list=`cat Current_series_list.txt`
select fileName in $Current_list; do
if [ -n "$fileName" ]; then
Selected_series=${fileName}
fi
break
done
The file path in the Current_series list is: /Volumes/Lara's Hard Drive/LARA HARD DRIVE/Series/The Big Bang Theory 3/The.Big.Bang.Theory S03E11.avi
and
/Volumes/Lara's Hard Drive/LARA HARD DRIVE/Series/nakitaS03E11.avi
So i would like them two be 1 and 2 respectively in my list but I get the following result.
1) /Volumes/Lara's 6) Big
2) Hard 7) Bang
3) Drive/LARA 8) Theory
4) HARD 9) 3/The.Big.Bang.Theory
5) DRIVE/Series/The 10) S03E11.avi
Type a number or 'q' to quit: