linux-command icon indicating copy to clipboard operation
linux-command copied to clipboard

awk页面的一命令示例错误(关于next语句): awk ‘/^web/{T=$0;next;}{print T“:\t”$0;}’ test.txt

Open gigberg opened this issue 2 years ago • 1 comments

如上,,, awk命令

此行应该修改为(其中制表符\t的斜杠被吞掉了) awk '/^web/{T=$0;next;}{print T":"t,$0;}' text.txt | | V awk ‘/^web/{T=$0;next;}{print T“:\t”$0;}’ test.txt

参考:Linux 使用 awk 文本处理工具实现多行合并的实例

还发现一处, 疑似漏掉了感叹号,应该改为 在 info 中查找满足正则表达式,/[0-9]+/ 用**””** 替换 | | V 在 info 中查找满足正则表达式,/[0-9]+/ 用**”!”** 替换

gigberg avatar Nov 01 '23 13:11 gigberg

@gigberg 欢迎提交 PR

jaywcjlove avatar Nov 02 '23 00:11 jaywcjlove