将某字符替换成换行符 #51
guodongxiaren
started this conversation in
教程
Replies: 1 comment
-
awk改用awk! 要点$NF表示最后一列。NF表示的是列个数 substr
awk和其他语言不通。数组不是从0计数的,因为0有特殊含义(表示整行)。
length($NF) = 6 substr($NF,length($NF)) 返回 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
某一次我脚本生成的一个README.md文件,缺失了换行符。比如:
拥有 1 位优秀回答者:
谢伟文这会导致显示的时候,这两行是挤在一行的。我想在有几位优秀回答者这行后面加一个空行。
在vim里面用
:s /:\n/:\n\n/g无效……Beta Was this translation helpful? Give feedback.
All reactions