Re: the old spaces in file names thingy in shell scripts

2007-10-11 Thread Bill Jonas
On Thu, Oct 11, 2007 at 09:23:16AM -0700, Craig White wrote: > #!/bin/sh > # > BASE="/home/storage/users/craig/Desktop/dw" > IN="in" > OUT="out" > for f in *.flv; do > MP4=`basename "$f" .flv`.mp4 > ffmpeg -i "$f" "$MP4" > mv "$f" "$BASE/$IN" > mv "$MP4" "$BASE/$OUT" > done To use a bash-

Re: the old spaces in file names thingy in shell scripts

2007-10-11 Thread Craig White
On Wed, 2007-10-10 at 21:06 -0700, Craig White wrote: > On Wed, 2007-10-10 at 18:52 -0700, Dale Farnsworth wrote: > > In article <[EMAIL PROTECTED]> you write: > > > My script breaks if the file names have spaces... > > > > > > #!/bin/sh > > > # > > > BASE="/home/storage/users/craig/Desktop/dw" >

Re: the old spaces in file names thingy in shell scripts

2007-10-10 Thread Craig White
On Wed, 2007-10-10 at 18:52 -0700, Dale Farnsworth wrote: > In article <[EMAIL PROTECTED]> you write: > > 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 `basenam

Re: the old spaces in file names thingy in shell scripts

2007-10-10 Thread Craig White
On Wed, 2007-10-10 at 17:59 -0700, Kurt Granroth wrote: > Craig White wrote: > > 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 > >

Re: the old spaces in file names thingy in shell scripts

2007-10-10 Thread Dale Farnsworth
In article <[EMAIL PROTECTED]> you write: > 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 I don't think the above basename args do what you want

Re: the old spaces in file names thingy in shell scripts

2007-10-10 Thread Kurt Granroth
Craig White wrote: > 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? > Double q

the old spaces in file names thingy in shell scripts

2007-10-10 Thread Craig White
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 <[EMAIL PROTECTED]> -