Forum Moderators: bakedjake
I did a little hack that does the requested job, using the '$@' bash variable. It will accept wildcard arguments on the command line, so you may run it on multiple files like
"iso2utf8 *.php".
#! /bin/bash
# iso2utf8 - convert all specified files to utf-8for FILE in `ls $@`
do
iconv -f iso-8859-1 -t utf-8 $FILE > tempfile.tmp
mv -f tempfile.tmp $FILE
ls -l $FILE
done
I hope that this may be of help to someone.
regards, Leif
[edited by: encyclo at 6:11 pm (utc) on June 6, 2007]
[edit reason] no signatures please [/edit]