| Post Reply | RetroFed Forums Forum Index » Shell Scripting |
| Author | Message | ||
|---|---|---|---|
|
loveknight
programming.dev
loveknight@programming.dev Joined: 2025-06-13 |
Let me show you what I mean by giving an example:
I guess one can always hack something together in awk with one or two track-keeper variables and a bit of control logic. However, is there a nicer way to do this, by using some nifty combination of simpler filters or awk functionalities? One way would be to search for the line number Still, I'm also wondering: Can awk or any other standard tool do something like "for deciding whether to print this line, look at the next line"? (In my use case, the list is short, so performance is not an issue, but maybe let's pretend that it were. Also, in my use case, all entries are unique, but feel free to work without this assumption.) |
||
| 1 Original | |||
| Post Reply |
Back to top |