---
title: "神awk"
author: "sharp-fcc"
date: "2020-07-28T11:59:52Z"
tags: []
categories: ["操作系统"]
slug: "awk"
draft: false
lastmod: "2020-07-28T12:20:41Z"
id: 2515923
url: "https://sharp-fcc.iteye.com/blog/2515923"
---

本篇内容记录awk神用法

 

不排序去重

```
awk ' !x[$0]++' file3
```

 

 

把linux文件处理成windows格式换行符

```
 awk 'sub("$","\r")'
```