Linux shell script FAQ: How can I deal with spaces (blank spaces) in my input data when I'm writing a shell script for loop or while loop?
I was just working on a Linux shell script, and ran into the ages-old problem of handling data that has spaces (space characters) in it. I run into this any time I try to read a data file with blank spaces in it, or when I run into files and directories with spaces in their names. Whenever I try to work this data like this in a shell script for loop, the spaces always ruin what I'm trying to accomplish.