• 0 Posts
  • 30 Comments
Joined 1 year ago
cake
Cake day: June 15th, 2023

help-circle
  • I really like how nushell can parse output into it’s native structures called tables using the detect command.

    Unlike string outputs, tables allow for easy data manipulation through pipes like select foo will select foo key and you can filter and even reshape the datasets.

    This is great if you need to work with large data pipes like kuberneters so you can do something like:

    kubectl get pods --all-namespaces | detect columns | where $it.STATUS !~ "Running|Completed" | par-each { |it| kubectl -n $it.NAMESPACE delete pod $it.NAME }
    

    This looks complex but it parses kubectl table string to table object -> filters rows only where status is not running or completed -> executes pod delete task for each row in parallel.

    Nushell take a while to learn but having real data objects in your terminal pipes is incredible! Especially with the detect command.

    There’s are few more shells that do that though nu is the most mature one I’ve seen so far.
















  • Dr. Moose@lemmy.worldtoAsklemmy@lemmy.mlWho's winning the war in Ukraine?
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    14
    ·
    edit-2
    10 months ago

    I don’t think Russia has any chance of winning. The only reason Russians are still in Ukraine is because the west is too pussy to ship the real guns.

    This makes you wonder whether people benefit from this or its trully a valid strategy not to bug squash the bully cause they might go mental.

    Either way, the war doesn’t have to end through military or peace agreements. Russian economy seems to be ending first. As grim as that sounds but maybe that’ll get Russians caring.