[clug] Help with bash script
Andrew Janke
a.janke at gmail.com
Fri Oct 31 23:59:02 GMT 2008
On Sat, Nov 1, 2008 at 10:49 AM, Rob Bolin <rob at unigon.tv> wrote:
> Can anyone suggest a fix for escaping these characters out in a script? My
> script follows.
> #!/bin/bash
> i=1
> for file in *.mp3
> do
> mv ${file} ${i}
> if [ $i -eq 10 ]
> then i=1
> else i=$[${i}+1]
> fi
> done
Well one thing to do as a start is this: (to take care of spaces).
mv "${file}" ${i}
a
More information about the linux
mailing list