Removing BOM from UTF-8
J. Erik Heinz
list at jerik.de
Sun Feb 19 01:09:10 PST 2006
Hi,
Gerard Seibert <gerard at seibercom.net> words
on 18.02.2006 - 16:57 (-0500 Zulu-Time):
> Benjamin A'Lee wrote:
> > It shouldn't be writing any new files; it prints the filtered text to
> > stdout.
> >
> > Ben
>
> OK, then that is the problem. I need it to actually write the file. It
> could either rename the old file and then rewrite it which would be nice,
> or just over write the old file. The BOM is just the first three
> characters in the file. I am assuming that it would not be removing
> anything else in the file.
use a for-loop in your shell:
# bash
# cd to/your/directory
# for i in *; do
# nobom.sh $i > $i.new
# done
this will take all your files in your directory and proceed each one it
with nobom.sh, which then will write it to new file.
Be sure that your perlscript points to your perl installation on your
system. You can use 'which perl' to get the location of your perl
installation.
Cheers Erik
--
J. Erik Heinz
Keyboard-samuraing in process
:: All non-mailinglist mail to this emailadress will be deleted.
OpenBC: https://www.openbc.com/hp/JErik_Heinz
More information about the freebsd-questions
mailing list