Friday, March 2, 2012

Filenames with spaces in bash

for x in *.png;
do
fn=`basename "${x}" .png | sed 's/ /\\ /g'`
convert "${fn}.png" "${fn}.jpg"
done

No comments:

Post a Comment