看不太懂這行sed的語法(取代unix2dos功 - Linux
By Victoria
at 2020-11-30T18:54
at 2020-11-30T18:54
Table of Contents
各位前輩好,
因為我想將unix文件轉成dos模式(加入carrige return),但不能用unix2dos指令。
在網路上找到以下的sed方式:
sed 's/$'"/`echo \\\r`/" file > output
可以用,但我實在看不懂這段語法…有人可以幫忙解釋一下嗎?
還是說以我的需求還有更簡單好懂的取代方式?(sed/awk/tr?) 先謝謝了。
-----
Sent from JPTT on my iPhone
--
Tags:
Linux
All Comments
By Mary
at 2020-12-02T01:41
at 2020-12-02T01:41
By Rebecca
at 2020-12-05T21:38
at 2020-12-05T21:38
By Oscar
at 2020-12-10T14:15
at 2020-12-10T14:15
By James
at 2020-12-10T23:11
at 2020-12-10T23:11
By Noah
at 2020-12-14T06:38
at 2020-12-14T06:38
By Michael
at 2020-12-17T08:22
at 2020-12-17T08:22
By Rosalind
at 2020-12-19T20:46
at 2020-12-19T20:46
By Jacky
at 2020-12-23T02:20
at 2020-12-23T02:20
By Joseph
at 2020-12-26T20:03
at 2020-12-26T20:03
By Kyle
at 2020-12-29T07:42
at 2020-12-29T07:42
By Dorothy
at 2020-12-30T18:13
at 2020-12-30T18:13
Related Posts
在container內安裝工具
By Robert
at 2020-11-24T01:32
at 2020-11-24T01:32
sed 取代問題求教
By Joseph
at 2020-11-23T12:29
at 2020-11-23T12:29
KVM 的 OpenGL
By Yuri
at 2020-11-22T02:22
at 2020-11-22T02:22
sed 取代問題求教
By Andy
at 2020-11-21T20:13
at 2020-11-21T20:13
root 放在 lvm raid 裡無法開機
By Olive
at 2020-11-20T20:32
at 2020-11-20T20:32