On Friday 15 February 2008 08:13:57 David C. Rankin wrote:
for i in *.zip; do unzip "$i" -d /mnt/nemesis-cfg/home/samba/computer/software/fonts/extract done
You want to have the quotes around $i to guard against spaces in file names
Anders
Anders,
I found the quotes around "$i" do not work for managing filenames with spaces. The filenames, spaces and all, are pulled in by the LIST="$(ls *.zip)". Quoted or unquoted, it makes no difference, because $i is just the next element in the list. Example: goodfile 001.jpg exists in the list as:
goodfile 001.jpg
for i $list; do echo "i = $1" done
gives:
i = goodfile i = 001.jpg
Yes, I know. That's not what I wrote. for i in *.jpg; do echo "i = $i" done i = goodfile 001.jpg forget about the quotes around LIST, or (better still) forget about LIST altogether Anders -- Madness takes its toll -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org