3 ms·
[3A] awk '/start_regex/,/end_regex/ {print}' can be simplified to: awk '/start_regex/,/end_regex/' because in awk, if no action is given, the default action
by vram22 9y ago
[3A] awk '/start_regex/,/end_regex/ {print}'
can be simplified to:
awk '/start_regex/,/end_regex/'
because in awk, if no action is given, the default action is to print the lines (that match the pattern). And if the pattern is omitted but the action is given, it means do the action on all lines of the input.
Edited to change:
print the line (that matches the pattern)
to
print the lines (that match the pattern)