4 ms·
> awk '/503/{print}' {print} is the default action, I believe. So it would suffice to do: awk '/503/' Though, then you may as well just use grep for someth
by jolmg 7y ago
> awk '/503/{print}'
{print} is the default action, I believe. So it would suffice to do:
awk '/503/'
Though, then you may as well just use grep for something like this.
- kylek 7y agoJust a basic example, I'd definitely use grep for something as simple as that. Only pointing out the pattern (you'll definitely have some heftier stuff in {} if you're going to bother with awk in that case)
- dredmorbius 7y agoThe typical awk case is to print selected fields, or operate on them (count, sum, classify, etc). So a '/<pattern>/ { print }' idiom is fairly common, generally on the way to something more refined.