News for hackers. Stuff that matters.
Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by password4321 on Thursday March 16, 2023 @09:56AM (#35182015)
Discussion of a similar tool last month:

yq: command-line YAML, JSON, XML, CSV and properties processor

https://news.ycombinator.com/item?id=34656022

Also mentions gojq, Benthos, xsv, Damsel, a 2nd yq, htmlq, cfn-flip, csvq, zq, and zsv.

Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by networked on Thursday March 16, 2023 @11:08AM (#35182936)
I have made a repository cataloguing tools like this: https://github.com/dbohdan/structured-text-tools.
Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by account-5 on Thursday March 16, 2023 @12:07PM (#35183844)
Thanks for this, good job. I always mean to do something similar but just end up bookmarking HN threads I then never look at.
Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by samstave on Thursday March 16, 2023 @01:10PM (#35184934)
Guilty as charged... I have so many bookmarks I forget to look at...

APPlet Idea: an app that picks a random bookmark from your saves and sends you a reminder to click it and read it... and schedule when you want to see it - like every 7AM send me a link from my bookmarks. Set an alarm for 15 minutes to get me back on schedule.

Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by damascus on Friday March 17, 2023 @02:15PM (#35200772)
So chatgpt and I made this: https://github.com/erasei/randombookmark Load in developer mode and when you click the icon it will open a new tab with a random bookmark.
Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by jefftk on Thursday March 16, 2023 @12:55PM (#35184674)
There's also GoAWK, which supports CSV natively ("-i csv"): https://github.com/benhoyt/goawk
Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by glomgril on Thursday March 16, 2023 @01:08PM (#35184904)
Big shouts to visidata -- very underrated tool imo.
Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by horseRad on Thursday March 16, 2023 @01:56PM (#35185627)
You should include qsv (https://github.com/jqnatividad/qsv) and goawk (https://github.com/benhoyt/goawk) into the CSV section! Goawk got a csv/tsv mode and qsv is loaded with features being developed.
Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by elesiuta on Thursday March 16, 2023 @02:12PM (#35185909)
Thank you! That list is perfect since I don't use these tools often enough to remember them and some are hard to find again without knowing exactly what to search for.

I also discovered pawk on it which looks interesting, I made a somewhat related tool [1] which is probably out of scope for your list, but can be used in some of the same ways [2] and may of of interest nonetheless.

[1] https://github.com/elesiuta/pyxargs

[2] cat /etc/hosts | pyxargs -d \n --im json --pre "d={}" --post "print(dumps(d))" --py "d['{}'.split()[0]] = '{}'.split()[1]"

Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by asicsp on Thursday March 16, 2023 @11:25AM (#35183209)
Seems like you meant https://github.com/TomWright/dasel (instead of damsel)
Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by password4321 on Thursday March 16, 2023 @12:00PM (#35183698)
Correct; thanks!
Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by dima55 on Thursday March 16, 2023 @12:32PM (#35184306)
There's also https://github.com/dkogan/vnlog/ which is a wrapper around the existing coreutils, so all the options work, and there's nothing to learn
Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by nextaccountic on Thursday March 16, 2023 @12:46PM (#35184540)
the obvious missing reference is jq https://github.com/stedolan/jq
Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by mdaniel on Thursday March 16, 2023 @01:45PM (#35185421)
I've been getting a lot of mileage out of https://github.com/itchyny/gojq#readme recently due to two things: its vastly superior error messages and the (regrettably verbose) `--yaml-input` option

I also have https://github.com/01mf02/jaq#readme installed but just haven't needed it

Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by donio on Thursday March 16, 2023 @02:29PM (#35186201)
-y and -Y unused so I patch those in as short flags for --yaml-input/output in my copy.
Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by password4321 on Thursday March 16, 2023 @02:50PM (#35186521)
True, for me that one's a given!
Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by elesiuta on Thursday March 16, 2023 @02:13PM (#35185931)
Another similar discussion last year where Miller was mentioned:

New(ish) command line tools

https://news.ycombinator.com/item?id=31009313

Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by donio on Thursday March 16, 2023 @04:02PM (#35187595)
Benthos is a really cool tool when you want to take this idea to the next level. It can do the usual text/csv/json/yaml mangling you'd do with awk or jq (since it includes a version of those in addition to its own processing langauge) but it also has decoders and encoders for a bunch of different binary formats like protobuf or Avro. And in addition to stdin/out and files it can talk to Kafka, MQTT, HTTP, ES and a bunch of other stuff. I was able to put together a log processor that consumes from Kafka, does a bunch of field mangling and then ingests into Elasticsearch in a couple dozen lines of yaml.
Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by dmix on Thursday March 16, 2023 @05:21PM (#35188858)
Anyone else find jq really hard to use? I found the syntax/interface bewildering at times. Although not as bad as awk.
Re:Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, ... by password4321 on Thursday March 16, 2023 @08:43PM (#35191145)
I'm pretty sure that's one big reason for all these other tools!