---
title: "mac,windows,linux 换行处理"
author: "sharp-fcc"
date: "2016-11-04T12:36:53Z"
tags: []
categories: ["移动开发"]
slug: "mac-windows-linux"
draft: false
lastmod: "2016-11-04T12:36:53Z"
id: 2335306
url: "https://sharp-fcc.iteye.com/blog/2335306"
---

如果是在windows上处理unix文件，使用如下命令:

```
D:\>TYPE unix_file | FIND /V "" > dos_file
```

 如果是在unix文件拿到windows文件， 使用如下命令:

```
tr -d '\r' < inputfile > outputfile
```

 或者

```
tr '\r' '\n' < inputfile > outputfile
```