Hacker GitHub

← All repos

bitfield/script

View on GitHub ↗ ★ 7,044 Go

Making it easy to write shell-like scripts in Go

21 mentions on Hacker News by 16 people: 12 stories, 9 comments · first 2019-06-10 · latest 2026-01-07

Mentions per year 21 mentions · busiest year 2024 (8)
20082026
  1. bitfield/script has some nice abstractions for bash builtins and coreutils https://github.com/bitfield/script
    comment by exographicskip · 2026-01-07 · in Go away Python
  2. ▲ 140
    Shell-ish scripting in Go with ease
    story by begoon · 2025-01-31 · 65 comments
  3. ▲ 3
    Script: Making it easy to write shell-like scripts in Go
    story by thunderbong · 2024-12-31 · 0 comments
  4. ▲ 3
    A paperwork-free API for Go scripting
    story by gus_leonel · 2024-09-10 · 0 comments
  5. ▲ 4
    Is it a shell script? No, it's Go
    story by gus_leonel · 2024-09-06 · 0 comments
  6. ▲ 1
    'script' is a package for writing shell-like scripts in Go
    story by gus_leonel · 2024-09-05 · 0 comments
  7. ▲ 1
    Making it easy to write shell-like scripts in Go
    story by signa11 · 2024-09-05 · 0 comments
  8. Check https://github.com/bitfield/script for shell-like scripts in Go.
    comment by gen2brain · 2024-08-13 · in Go is my hammer, and everything is a nail
  9. …started unifying things. [0] https://github.com/casey/just [1] https://magefile.org/magefiles/ [2] https://github.com/bitfield/script
  10. That's why I plan on migrating all my shell scripts to Golang programs f.ex. using https://github.com/bitfield/script -- it already has a number of simulations of shell commands and I'd contribute others if I had the time. sh / bash / zsh…
  11. I use Go. You can run scripts with go run directly, and this package makes shell tasks easy: https://github.com/bitfield/script
  12. I believe error handling looks like this: package main import ( "github.com/bitfield/script" ) func main() { _, err := script.Stdin().Column(1).Freq().First(10).Stdout() if err != nil { log.Fatal(err) } } Errors are "remembered" by the…
    comment by simonw · 2023-08-20 · in Scripting with Go (2022)
  13. …(though it's in the script README) - what a complete program looks like. Here's the example from https://github.com/bitfield/script#a-realistic-use-case package main import ( "github.com/bitfield/script" ) func main() {…
    comment by simonw · 2023-08-20 · in Scripting with Go (2022)
  14. ▲ 1
    'script' is for writing shell-like pipelines in Go
    story by bitfield · 2023-04-28 · 0 comments
  15. …from shell pipes and turning it into a Go library with syntax this clean is really impressive: https://github.com/bitfield/script
    comment by simonw · 2022-03-12 · in Scripting with Go
  16. It took me a while to find the link to the library "script" and it's repo - https://github.com/bitfield/script
    comment by mftb · 2022-03-11 · in Scripting with Go
  17. ▲ 4
    “script” – making it easy to write shell-like scripts in Go
    story by alexellisuk · 2019-09-21 · 2 comments
  18. ▲ 6
    Script – Making it easy to write shell-like scripts in Go
    story by therealssj · 2019-09-15 · 0 comments
  19. ▲ 2
    Making it easy to write shell-like scripts in Go
    story by mooreds · 2019-09-10 · 0 comments
  20. ▲ 1
    Script: Making it easy to write shell-like scripts in Go
    story by mpweiher · 2019-07-10 · 0 comments
  21. ▲ 1
    Making it easy to write shell-like scripts in Go
    story by adam-p · 2019-06-10 · 0 comments