Studying and awk came up.

Spent about an hour and I see some useful commands that extend past what “cut” can do. But really when dealing with printf() format statements is anyone using awk scripts for this?

Or is everyone just using their familiar scripting language. I’d reach for Python for the problems being presented as useful for awk.

  • @ikidd
    link
    English
    29 months ago

    Just had to use it today to turn a key file into a single string with line breaks:

    awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' id_rsa