Ljubomir Ljubojevic
2014-Mar-06  22:13 UTC
[CentOS] OT Help for Cyrillic/percent letters to UTF-8 conversion script
Hi.
I found a script which converts file names with with Cyrillic names 
downloaded from internet. They have letters like "%20" = "
"(space), etc.
Script is using xargs:
for i in $(find * -type f ); do j=$(echo $i | sed 
-e's/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g' | xargs echo -e); echo $j; mv 
"$i" "$j";  done
or:
for i in $(find * -type f );
    do j=$(echo $i | sed -e's/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g' | xargs 
echo -e);
    echo $j;
    mv "$i" "$j";
done
But I have to apply it on server with Jailkit that does not allow xargs 
command.
Does someone know how I can do it differently?
Thanks,
-- 
Ljubomir Ljubojevic
(Love is in the Air)
PL Computers
Serbia, Europe
StarOS, Mikrotik and CentOS/RHEL/Linux consultant
