4 ms·
Ask HN: Looking for a series on implementing classic Unix tools from scratch
This can be blogs, books, or YouTube. I'm working on upping my C skills and have started to reimplement some tools like wc, cat, etc. I'm wondering if there are good walkthroughs out there for some of the more complex tools like sort, xargs, etc.
Any further advice on C for the 20 teens is also welcome.
- totalperspectiv 8y agoFor future travelers, these are the best resources I've seen so far: https://learnto.computer https://learnto.computer https://viewsourcecode.org/snaptoken/kilo/ https://viewsourcecode.org/snaptoken/kilo/ https://www.cs.princeton.edu/courses/archive/spr09/cos333/beautiful.html https://www.cs.princeton.edu/courses/archive/spr09/cos333/be...
- msie 8y ago“Software Tools” by Kernighan & Plauger
- vram22 8y agoI've heard that book recommended a lot earlier, in various other good books or articles. Would like to read it. But not the original one in RATFOR, rather the second version in Pascal. Just checked on Amazon, there is a copy, but not in Pascal. Update: Just found a used copy of the Pascal version on Amazon India, ordered it.
- monadgonad 8y ago> Any further advice on C for the 20 teens is also welcome. The book 21st Century C by Ben Clemens is worth a look.
- aargh_aargh 8y agoRead the source, but rather than the GNU variants, look at the *BSD ones. They're much more readable.
- vram22 8y agoI have been casually writing Python versions of such Unix tools (not with all the features and options, just the parts that I feel like or know how to do) off and on, for a while now, and often post about them on my blog, when I do write such tools. The union of the sets of posts at these two links: http://jugad2.blogspot.in/search/label/command-line http://jugad2.blogspot.in/search/label/command-line and http://jugad2.blogspot.in/search/label/python http://jugad2.blogspot.in/search/label/python should have many such posts about versions of Unix command line tools implemented by me in Python. Also, this tutorial I wrote years ago for IBM developerWorks may be of use, to learn some of the informally handed down but generally accepted principles and techniques for writing such command line tools in C: Developing a Linux command-line utility: https://jugad2.blogspot.com/2014/09/my-ibm-developerworks-article.html https://jugad2.blogspot.com/2014/09/my-ibm-developerworks-ar... The post is an overview of the article I wrote for IBM, with some background about it, etc. For the actual code in C and the PDF of the IBM article, follow relevant links in the post, to more than one level, as needed.
- totalperspectiv 8y agoYour posts are excellent! Thank you for sharing them!
- vram22 8y agoThank you! You're welcome.
- koots 8y agoHacker Tools MIT course Learn to make the most of the tools that hackers have been using for decades. https://hacker-tools.github.io https://hacker-tools.github.io