3 ms·
Inspired by comments in this thread, I threw together a Bash script that lets you do this: cat file.txt | ./goscript.sh -c 'script.Stdin().Column(1).Freq()
by simonw 3y ago
Inspired by comments in this thread, I threw together a Bash script that lets you do this:
cat file.txt | ./goscript.sh -c 'script.Stdin().Column(1).Freq().First(10).Stdout()'
You can also use it as a shebang line to write self-contained scripts.
Details here: https://til.simonwillison.net/bash/go-script https://til.simonwillison.net/bash/go-script