Quantcast
Channel: User Kamil Maciorowski - Super User
Viewing all articles
Browse latest Browse all 680

Comment by Kamil Maciorowski on How to extract a text in between two patterns (potentially containing floating lookbehind) with only one invocation?

$
0
0
"grep is invoked two times, which may be considered suboptimal" – I can see from this answer there is an elegant way with one grep, still in general there is no guarantee that one grep performs better than grep | grep. I can imagine in some cases clever piping may win. You were even willing to accept a different tool. Would you measure its performance and compare to 2xgrep? Or would you assume one tool is better than a pipe of two? For a small dataset it wouldn't matter anyway. My point is "optimization for optimization's sake" may be wrong.

Viewing all articles
Browse latest Browse all 680

Trending Articles