• bugsmithA
    link
    fedilink
    arrow-up
    10
    ·
    9 months ago

    Love this. Always interesting to see novel ways of querying data in the terminal, and I agree that jq’s syntax is difficult to remember.

    I actually prefer nu(shell) for this though. On the lobste.rs thread for this blog, a user shared this:

    | get license.key -i
    | uniq --count
    | rename license
    
    This outputs the following:
    
    ╭───┬──────────────┬───────╮
    │ # │    license   │ count │
    ├───┼──────────────┼───────┤
    │ 0 │ bsd-3-clause │    23 │
    │ 1 │ apache-2.0   │     5 │
    │ 2 │              │     2 │
    ╰───┴──────────────┴───────╯
    
    
    • Kissaki
      link
      fedilink
      English
      arrow-up
      1
      ·
      9 months ago

      Haha, I tried querying in Nushell before reading this and I was sure there was a better way. And indeed there is (especially since I was missing uniq). I’m still learning the available operators, but I enjoy the shell a lot, as well as its promised capabilities.

      • bugsmithA
        link
        fedilink
        arrow-up
        2
        ·
        9 months ago

        I really like Nushell. I would not run it as a daily driver currently, as it mostly doesn’t win me over from Fish, feature-wise, but I love having it available for anything CLI date pipeline work I need to do.