×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles

    Fix broken Umlauts in Filenames

    Revision as of 18:54, 15 May 2013 by imported>Took (Created page with "Not really optimized yet... [pre] #/bin/bash for d in * do if [ -d $d ]; then cd "$d" for i in * do #x=$(echo $i | sed 's/\xc2\x91\|\xc2\x92\|\xc2\xa0\|...")
    (diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

    Not really optimized yet...

    [pre]

    1. /bin/bash

    for d in *

     do
     if [ -d $d ]; then
       cd "$d"
       for i in *
       do
         #x=$(echo $i | sed 's/\xc2\x91\|\xc2\x92\|\xc2\xa0\|\xe2\x80\x8e//g' | sed 's/ü/ue/g' | sed 's/[^a-z0-9_~\.-]/_/gi' )
         x=$(echo $i | iconv -f utf8 -t ascii//TRANSLIT -c)
         echo "$x"
         mv "$i" "$x"
       done
       cd ..
     fi
    

    done [/pre]

    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.