I both love and hate awk – on the one hand, it provides the same/similar functionality of similar tools (sed, grep, cut, etc); but it is a bit of a bear and can be pretty slow.
If you need more “complex” tasks done what would be cumbersome with the rest of the standard tooling, and performance is a non-issue, awk/gawk can probably get it done.
Though, I too am trying to use it as little as possible in scripts. I think multiple subshells/pipes is still better than awk in some cases. Syntax also leaves a lot to be desired…
There are times when dealing with annoying field separators that awk is a more convenient tool – though, I’m also now at the stage that I want to do as much with bash-builtins as I possibly can.
I both love and hate awk – on the one hand, it provides the same/similar functionality of similar tools (sed, grep, cut, etc); but it is a bit of a bear and can be pretty slow.
If you need more “complex” tasks done what would be cumbersome with the rest of the standard tooling, and performance is a non-issue, awk/gawk can probably get it done.
Though, I too am trying to use it as little as possible in scripts. I think multiple subshells/pipes is still better than awk in some cases. Syntax also leaves a lot to be desired…
My experience exactly. I’d rather use a specific tool designed for the task than invoke a whole new language. It just feels… icky for some reason.
There are times when dealing with annoying field separators that
awkis a more convenient tool – though, I’m also now at the stage that I want to do as much withbash-builtinsas I possibly can.