[Vorbis] [sorta offtopic] Removing bad bytes from filenames

vorbis at towanda.com vorbis at towanda.com
Mon Aug 20 14:28:39 PDT 2007


You could also have used "tr", something like this:

for i in *Thou*18*
do
  j=`echo "$i" | tr -d "\277"`
  if [ "$i" != "$j" ]
  then
    mv -i "$i" "$j"
  fi
done

I just now discovered that this should also work:

rename Thou`echo -ne "\277"` Thou *.ogg

- Larry Fenske

> $ ls -b *Thou*18*
> Various\ -\ O\ Brother,\ Where\ Art\ Thou\277\ (18)\ -\ Fairfield\ Four\ 
> -\ Lonesome\ Valley\ [4.07].ogg
> $ rename Thou\0277 Thou *.ogg
> $ ls -b *Thou*18*
> Various\ -\ O\ Brother,\ Where\ Art\ Thou\277\ (18)\ -\ Fairfield\ Four\ 
> -\ Lonesome\ Valley\ [4.07].ogg
> 
> Any bright ideas? Awk, maybe? Hmm.
> 
> Thanks.
> -Chris



More information about the Vorbis mailing list