Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gigberg opened this issue Nov 1, 2023 · 1 comment

Comments

@gigberg
Copy link

gigberg commented Nov 1, 2023

如上,,,
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]+/ 用**”!”** 替换

@jaywcjlove
Copy link
Owner

@gigberg 欢迎提交 PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants