shell命令--sed使用方法总结

版权声明:使用中有任何问题,可以留言。能解答尽量解答。 https://blog.csdn.net/liyyzz33/article/details/87968640

在文件中每行之间加入换行

sed -i 's/^/\n/g'   /file

vim中替换用法
用字符串 str2 替换行中所有出现的字符串 str1
:%s/str1/str2/g
清除页面中所有行尾的空白符:
:%s//s/+$//

猜你喜欢

转载自blog.csdn.net/liyyzz33/article/details/87968640