the old spaces in file names thingy in shell scripts

Craig White craig at tobyhouse.com
Wed Oct 10 17:24:27 MST 2007


My script breaks if the file names have spaces...

#!/bin/sh
#
BASE="/home/storage/users/craig/Desktop/dw"
IN="in"
OUT="out"
for f in *.flv; do ffmpeg -i $f `basename $f.mp4 .flv`; done
mv *flv $BASE/$IN
mv *mp4 $BASE/$OUT

How can I fix this?

-- 
Craig White <craig at tobyhouse.com>



More information about the PLUG-discuss mailing list