Using Unix pipes with Go

Using Unix pipes with Go

šŸ“… — šŸ§® 698 words — šŸ·ļø tech go unix tutorial

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.

Package 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.

šŸ’¬ Read more
Black and white picture of Gerben Jacobs
Hi!

Iā€™m 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.

More about me, including links to other online services, can be found at gerben.dev

Tags

agile 1 go 2 personal 11 php 5 roi-stock-portfolio 3 scandinavia-2013 3 stocks 3 tech 18 tutorial 1 unix 1 web 1 youtube 1

Socials

Meta