jaywcjlove / jaywcjlove/linux-command
awk页面的一命令示例错误(关于next语句): awk ‘/^web/{T=$0;next;}{print T“:\t”$0;}’ test.txt
- Dominant language
- Markdown
- Stars
- 36.9k
- Forks
- 6.6k
- PR merge metrics
- No merged PRs in 30d
Description
如上,,,
[awk命令](https://wangchujiang.com/linux-command/c/awk.html#:~:text=awk%20%27/%5Eweb/%7BT%3D%240%3Bnext%3B%7D%7Bprint%20T%22%3A%22t%2C%240%3B%7D%27%20text.txt)
此行应该修改为(其中制表符\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 文本处理工具实现多行合并的实例](https://m.xp.cn/b.php/71985.html#:~:text=awk%20%E2%80%98/%5Eweb/%7BT%3D%240%3Bnext%3B%7D%7Bprint%20T%E2%80%9C%EF%BC%9A%5Ct%E2%80%9D%240%3B%7D%E2%80%99%20test.txt)
还发现一处, 疑似漏掉了感叹号,应该改为
在 info 中查找满足正则表达式,/[0-9]+/ 用**””** 替换
|
|
V
在 info 中查找满足正则表达式,/[0-9]+/ 用**”!”** 替换
Contributor guide
Research direction
Start with the linked awk page and inspect the two examples identified in the issue. Verify the escaped tab and exclamation-mark corrections against the referenced examples, update the rendered documentation, and check that both commands display correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- awk
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100