Bash:在文件中的特定位置插入一行

Bash:在文件中的特定位置插入一行,第1张

Bash:在文件中的特定位置插入一行

如果要在特定字符串匹配之后添加一行:

$ awk '/master.mplayer.com/ { print; print "new line"; next }1' foo.inputServerActors=IpServer.UdpServerUplink MasterServerAddress=unreal.epicgames.com MasterServerPort=27900ServerActors=IpServer.UdpServerUplink MasterServerAddress=master0.gamespy.com MasterServerPort=27900ServerActors=IpServer.UdpServerUplink MasterServerAddress=master.mplayer.com MasterServerPort=27900new lineServerActors=UWeb.WebServer


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5015200.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-14
下一篇 2022-11-14

发表评论

登录后才能评论

评论列表(0条)

保存