---
title: "linux批量去除 utf-8 bom"
author: "name327"
date: "2015-11-26T15:48:06Z"
tags: []
categories: ["编程语言"]
slug: "linux-utf-8-bom"
draft: false
lastmod: "2015-11-26T15:48:06Z"
id: 2259486
url: "https://name327.iteye.com/blog/2259486"
---

```
#!/bin/bash

cat fff.txt | while read line
do
    echo $line
    vim +":set nobomb" +":set fileencoding=utf8" +":wq" $line < /dev/tty
done
```