OT Help for Cyrillic/percent letters to UTF-8 conversion script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux