Using Unix pipes with Go
📅
—
🧮 709 words
— 🏷️
tech
go
unix
tutorial
open-source
🔗 Permalink
—
Header by Alan Levine CC BY 2.0
Go has made it easy to work with Unix operations, it comes with the platform-independent built-in package os
to interface with the operating system.
They offer nice features such as os.Stdin
and os.Stdout
, wrappers of type os.File
around the OS’s common standard streams.
The os/exec
package is also great. It allows you to run Unix-tools from within your Go application.
💬 Read morePackage exec runs external commands. It wraps os.StartProcess to make it easier to remap stdin and stdout, connect I/O with pipes, and do other adjustments.
Gerben Jacobs is a 36-year-old software engineer from The Netherlands. My interests lie with (web)development, databases, design patterns, social media, communities, APIs and open data.
Check out my project-based site at gerben.dev
I don't have an About page, but I do have a Now page.