Re: Bash script for files with spaces in the filenames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday, Feb 16th 2006 at 09:19 -0600, quoth Mikkel L. Ellertson:

=>I usually use something like:
=>
=>#!/bin/bash
=>for file in *.mp3
=>do
=>  eyeD3 --force-update --set-encoding=utf8 "$file"
=>done

and that can be fixed by saying

#!/bin/bash
for file in *.mp3
do
  [[ -f "$file" ]] && eyeD3 --force-update --set-encoding=utf8 "$file"
done

-- 
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux