olafurp, (edited )

I think it’s pretty niche but is a great tool for parsing / converting data into a format that is more easily digested by another program.

Think for example a report from an 80’s system that spits out many tab separated values in a different format based on some code. Then these tables are all separated by two blank lines and order of them is randomised. To top that off you need to then pipe it all to a different program that only accepts a specific format.

You could do it in Python by doing a parse, process, stringify code but if you know awk you can do all those steps at the same time with less code.

Sure, in the age of REST the Python approach is better but awk is a very powerful tool for the “I have a specific output but need a specific input” problem.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • localhost
  • All magazines
  • 200 @ entry_comment_voters
    HTTP status 200 OK
    Route name entry_comment_voters
    Has session yes
    Stateless Check no
    Time 677 ms
    Total time 677 ms
    Initialization time 152 ms
    Memory 14.0 MiB
    Peak memory usage 14.0 MiB
    PHP memory limit 128 MiB
    Logger 88
    Errors 0
    Warnings 0
    Deprecations 88
    Cache 47 in 308.45 ms
    Cache Calls 47
    Total time 308.45 ms
    Cache hits 37 / 54 (68.52%)
    Cache writes 10
    3
    Default locale en
    Missing messages 3
    Fallback messages 0
    Defined messages 119
    Security n/a
    Authenticated No
    Firewall name main
    Twig 420 ms
    Render Time 420 ms
    Template Calls 80
    Block Calls 16
    Macro Calls 6
    53 in 370 ms
    settings_row_switch 15
    user_avatar 13
    user_settings_row_switch 4
    date 3
    user_inline 2
    settings_row_enum 2
    entry_comment 1
    date_edited 1
    vote 1
    boost 1
    user_actions 1
    magazine_box 1
    magazine_sub 1
    related_magazines 1
    active_users 1
    related_categories 1
    related_posts 1
    related_entries 1
    support_us_block 1
    featured_magazines 1
    15 in 250.79 ms
    Database Queries 15
    Different statements 13
    Query time 250.79 ms
    Invalid entities 0
    Cache hits 32
    Cache misses 4
    Cache puts 4
    6.4.0
    Profiler token 07c154
    Environment dev
    Debug enabled
    PHP version 8.2.26   View phpinfo()
    PHP Extensions Xdebug ✗ APCu ✓ OPcache ✓
    PHP SAPI apache2handler