Hi, I'd like to iterate over the selected files (%f) in a bash script. I've tried many variants, however, none of these is working if the file names contain spaces, e.g.
#!/bin/bash
files=$1
for file in $files
do
echo $file
done
splits also each file name at the containing spaces. Called with:
command! iterate iterate.sh "%f"
Does anybody have a working script which can handle also this case? Thank you!