---
title: "sed替换^M为回车"
author: "sharp-fcc"
date: "2016-04-29T18:05:58Z"
tags: []
categories: ["编程语言"]
slug: "sed-m"
draft: false
lastmod: "2016-06-28T21:42:51Z"
id: 2294915
url: "https://sharp-fcc.iteye.com/blog/2294915"
---

sed -e 's/^M/\\n/g' myfile.txt

注意   ^M 使用“CTRL-V CTRL-M”生成，而不是直接键入“^M”。