Hacker News new | ask | show | jobs
by molteanu 2922 days ago
Also a nice read: The art of writing Linux utilities (Developing small, useful command-line tools) [0]

[0] http://people.fas.harvard.edu/~lib113/reference/unix/writing...

1 comments

A tutorial I had written for IBM developerWorks, titled "Developing a Linux command-line utility" (in C), is mentioned in the Resources section of that page ([0]) above.

But that article was archived from the IBM dW site some time ago, after being there for some years. However, I wrote to IBM and got the PDF of the article, and put it on my Bitbucket account, with the C code for the utility.

This post on my blog describes the article:

https://jugad2.blogspot.com/2014/09/my-ibm-developerworks-ar...

And here is the Bitbucket project for selpg, the utility used as a case study, with the C code and the article text (as PDF):

https://bitbucket.org/vasudevram/selpg

The article and all the source files are here:

https://bitbucket.org/vasudevram/selpg/src

It may be of use to people who want to progress beyond using Unix / Linux command-line utilities (in C, but the principles and techniques can be adapted to other languages like Python, Ruby, etc.), to writing such utilities themselves, along with integrating them into shell scripts and pipelines.