Hacker News new | past | comments | ask | show | jobs | submit login
Text Manipulation in Linux: Awk vs. Sed (linuxjournal.com)
11 points by dxs 7 months ago | hide | past | favorite | 4 comments



The way I look at it, awk is sort of like sed except it can maintain state between records: https://two-wrongs.com/grep-sed-and-awk-the-right-tool-for-t...

This can be used to make a state machine parser: https://two-wrongs.com/awk-state-machine-parser-pattern.html


How could a "Text Manipulation in Linux" article not even mention Perl (https://www.perl.org/) ?

That would be like writing an article about computing hardware and not including IBM at all.


There's hardly anything at all in the article, let alone expect some nuanced discussion. Just one example each for `awk` and `sed` (the very basics, and that too without example input/output - just the command).


>> There's hardly anything at all in the article, let alone expect some nuanced discussion.

You are right, although the article claims otherwise:

"This article delves deep into both, unraveling their complexities, comparing their functionalities, and guiding users on when and how to use them effectively."

But there are only five short paragraphs on awk and another five on sed--hardly a deep dive.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: