Ciao
Come si fà a lanciare questo script nella directory language ?
Codice:
#!/bin/sh
TEMP_SED=$(mktemp)
cat << EOF > $TEMP_SED
s/\(.*\)\(à\)\(.*\)/\1\à\3/g
s/\(.*\)\(é\)\(.*\)/\1\é\3/g
s/\(.*\)\(è\)\(.*\)/\1\è\3/g
s/\(.*\)\(ì\)\(.*\)/\1\ì\3/g
s/\(.*\)\(ù\)\(.*\)/\1\ù\3/g
EOF
PHP_FILES="italian.php $(find italian -name '*.php')"
for i in $PHP_FILES;
do
sed -f $TEMP_SED $i > $i.temp;
mv -vfb $i.temp $i
done
rm -f $TEMP_SED
lanciare il seguente script shell
Moderatore: mod Generali
Re: lanciare il seguente script shell
A cosa serve questo script?cif2006 ha scritto:Ciao
Come si fà a lanciare questo script nella directory language ?
Codice:
#!/bin/sh
TEMP_SED=$(mktemp)
cat << EOF > $TEMP_SED
s/\(.*\)\(à\)\(.*\)/\1\à\3/g
s/\(.*\)\(é\)\(.*\)/\1\é\3/g
s/\(.*\)\(è\)\(.*\)/\1\è\3/g
s/\(.*\)\(ì\)\(.*\)/\1\ì\3/g
s/\(.*\)\(ù\)\(.*\)/\1\ù\3/g
EOF
PHP_FILES="italian.php $(find italian -name '*.php')"
for i in $PHP_FILES;
do
sed -f $TEMP_SED $i > $i.temp;
mv -vfb $i.temp $i
done
rm -f $TEMP_SED