zaměnit text ve více souborech



#!/bin/bash
for file in ´ls ./includes/*.inc´ ; do
   sed -e 's/iso-8859-2/utf-8/g' "$file" > tmp_file
   mv tmp_file "$file"
done

jednoduchy skript, ktery zmeni kodovani vsech souboru v aktualnim adresari, vcetne radku s charset (html/php)
#!/bin/bash
for  i in ´ls´ ;
do
if [ ! -d $i ] && [ $i != "my_script_name" ]; then
sed -e 's/utf-8/iso-8859-2/gi' "$i" > $i-iso
iconv -f utf-8 -t iso-8859-2 $i-iso > $i
rm -f ./$i-iso
fi
done
Last update:
2007-09-21 09:55
Author:
Daniel
Revision:
1.27
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.