update.
[chise/ruby.git] / tools / trim_bom.rb
1 #!/usr/bin/env ruby
2 # Copyright (C) 2002-2004 Kouichirou Eto, All rights reserved.
3 # remove BOM at the begining of the file by eto 2002-1203
4
5 STDOUT.binmode
6 while gets
7   if /^\M-o\M-;\M-?/
8     $_.sub!(/^\M-o\M-;\M-?/, "")
9   end
10   print $_
11 end