I'm trying to get a shell script to work on every file in a directory. But I have a problem with spaces in the filenames. Here's a code example to illustrate:
for f in $(ls -1)
And here's what happens:
$ ls -1
As you can see, the file entries get split by their space. Any ideas on how to conquer this problem?