Can anyone suggest something similar for Windows?
PowerShell can handle CSV files natively. Here are the equivalent commands from the article: Import-Csv example.csv | Select-Object year, price | Export-Csv -NoTypeInformation example-cut.csv Import-Csv example.csv | Sort-Object year | Export-Csv -NoTypeInformation example-sorted.csv Import-Csv example.csv | Where-Object year -eq 1999 | Export-Csv -NoTypeInformation example-filtered.csv PowerShell can also deal with…
As cool as miller is, jq is also decidedly cool, but for json. Both claim that they are "like" awk, sed, cut, paste etc, but for $Format, where $Format is csv/tsv and json, respectively.
They both deal with much the same tasks, and there is considerable overlap.
What your PowerShell examples do not say, is how - after Import-Csv - you are no longer constrained to tools written for csv's (or json or ...). At that point the records of the csv file have become objects in the PowerShell type system (which is an extension of the .NET type system).
Another point about the corresponding functionality in PowerShell is how you do not need to convert back to csv, json or whatever. Your Export-Csv commands in your examples are only needed if you want to finally save the results as csv. Otherwise you would just keep the objects in a variable or flowing through the pipeline/script.
So TFAs 2nd example could be written
ipcsv flins.csv | group county -n
If the data had been in json, one would write cat flins.json | convertfrom-json | group county -n
Which also means that data can be export through any cmdlet that exports or converts a stream of objects: Export-Csv, ConvertTo-Csv, ConvertTo-Html, ConvertTo-Json, ConvertTo-Xml, ...