5 ms·
Ask HN: Whats best way to learn all there's to learn about Unix Pipes?
- danso 11y agoIn what way? My general advice is to do things you've done before, but move them to Unix. For example, if you're on Mac OS X, use pbcopy and pbpaste, which read from/into stdout and stdin, respectively, rather than doing Cmd-C and Cmd-V. Use pipes gradually, one or two at a time, and then you start to see how it can fit into a bigger workflow. If you work with data, it's even easier to find ways to practice pipes. Here's a gist showing how to use pipes with other Unix utils and SQLite to do a quick command-line analysis of SF restaurant inspections (namely, finding dirty Starbucks: https://gist.github.com/dannguyen/c9dd7afc4300ae8715d8 https://gist.github.com/dannguyen/c9dd7afc4300ae8715d8 It's actually a bit convoluted, as it focuses on using SQLite. You could do a similar analysis just using the excellent csvkit tool to slice and dice CSV files via the command-line. I put together a list of Unix tools that I liked for a class that used a lot of piping: http://www.compciv.org/unix-tools/ http://www.compciv.org/unix-tools/
- dalke 11y ago> In what way? You're right to ask that. I thought the question was about how they are implemented at the OS level, where the answer would be an operating system book like "Advanced Programming in the Unix Environment". (It's been a while; I've forgotten how that book treats pipes and don't know if it's an appropriate answer to the question I thought was being posed.)