Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
在Linux终端下批量替换文本文件特定字符串的问题
Experiences and Insight
589
views ·
1
replies ·
To
floor
Go
xliang9550
deepin
2013-04-26 22:12
Author
假设有若干文本文件,大小在MB量级,需要将其中的特定字符串‘abc’替换为‘123’。用Windows自带notepad的查找替换功能效率太低,用VB.net编程的效率和兼容性都不理想。
不知在Linux终端下(可借助Bash脚本编程)有没有效率更高的方法。
Reply
Like 0
Favorite
View the author
All Replies
136******54
deepin
2013-04-27 03:28
#1
在vim中,按“:”进入命令行模式
输入“%s/abc/123/”即可全部替换
输入“%s/abc/123/gc”则可选择某些替换,某些不替换
Reply
Like 0
View the author
Please
sign
in first
New Thread
Popular Ranking
Change
Super-annoying Deepin [torrent] Downloader bug
Watchtower Lbrary Wine
Error when installing Deepin 2
Popular Events
More
不知在Linux终端下(可借助Bash脚本编程)有没有效率更高的方法。